timer.h 1006 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * include/asm-s390/timer.h
  3. *
  4. * (C) Copyright IBM Corp. 2003
  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. #include <linux/timer.h>
  12. #define VTIMER_MAX_SLICE (0x7ffffffffffff000LL)
  13. struct vtimer_list {
  14. struct list_head entry;
  15. int cpu;
  16. __u64 expires;
  17. __u64 interval;
  18. spinlock_t lock;
  19. unsigned long magic;
  20. void (*function)(unsigned long, struct pt_regs*);
  21. unsigned long data;
  22. };
  23. /* the offset value will wrap after ca. 71 years */
  24. struct vtimer_queue {
  25. struct list_head list;
  26. spinlock_t lock;
  27. __u64 to_expire; /* current event expire time */
  28. __u64 offset; /* list offset to zero */
  29. __u64 idle; /* temp var for idle */
  30. };
  31. extern void init_virt_timer(struct vtimer_list *timer);
  32. extern void add_virt_timer(void *new);
  33. extern void add_virt_timer_periodic(void *new);
  34. extern int mod_virt_timer(struct vtimer_list *timer, __u64 expires);
  35. extern int del_virt_timer(struct vtimer_list *timer);
  36. #endif