timer.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * include/asm-s390/timer.h
  3. *
  4. * (C) Copyright IBM Corp. 2003,2006
  5. * Virtual CPU timer
  6. *
  7. * Author: Jan Glauber (jang@de.ibm.com)
  8. */
  9. #ifndef _ASM_S390_TIMER_H
  10. #define _ASM_S390_TIMER_H
  11. #ifdef __KERNEL__
  12. #include <linux/timer.h>
  13. #define VTIMER_MAX_SLICE (0x7ffffffffffff000LL)
  14. struct vtimer_list {
  15. struct list_head entry;
  16. int cpu;
  17. __u64 expires;
  18. __u64 interval;
  19. spinlock_t lock;
  20. unsigned long magic;
  21. void (*function)(unsigned long, struct pt_regs*);
  22. unsigned long data;
  23. };
  24. /* the offset value will wrap after ca. 71 years */
  25. struct vtimer_queue {
  26. struct list_head list;
  27. spinlock_t lock;
  28. __u64 to_expire; /* current event expire time */
  29. __u64 offset; /* list offset to zero */
  30. __u64 idle; /* temp var for idle */
  31. };
  32. extern void init_virt_timer(struct vtimer_list *timer);
  33. extern void add_virt_timer(void *new);
  34. extern void add_virt_timer_periodic(void *new);
  35. extern int mod_virt_timer(struct vtimer_list *timer, __u64 expires);
  36. extern int del_virt_timer(struct vtimer_list *timer);
  37. #endif /* __KERNEL__ */
  38. #endif /* _ASM_S390_TIMER_H */