1 #define TIMER_RETRY 1 2 3 struct k_clock { 4 int (*clock_getres)(const clockid_t which_clock, 5 struct timespec64 *tp); 6 int (*clock_set)(const clockid_t which_clock, 7 const struct timespec64 *tp); 8 int (*clock_get)(const clockid_t which_clock, 9 struct timespec64 *tp); 10 int (*clock_adj)(const clockid_t which_clock, struct timex *tx); 11 int (*timer_create)(struct k_itimer *timer); 12 int (*nsleep)(const clockid_t which_clock, int flags, 13 struct timespec64 *, struct timespec __user *); 14 long (*nsleep_restart)(struct restart_block *restart_block); 15 int (*timer_set)(struct k_itimer *timr, int flags, 16 struct itimerspec64 *new_setting, 17 struct itimerspec64 *old_setting); 18 int (*timer_del)(struct k_itimer *timr); 19 void (*timer_get)(struct k_itimer *timr, 20 struct itimerspec64 *cur_setting); 21 void (*timer_rearm)(struct k_itimer *timr); 22 }; 23 24 extern const struct k_clock clock_posix_cpu; 25 extern const struct k_clock clock_posix_dynamic; 26 extern const struct k_clock clock_process; 27 extern const struct k_clock clock_thread; 28 extern const struct k_clock alarm_clock; 29 30 int posix_timer_event(struct k_itimer *timr, int si_private); 31 32 void posix_cpu_timer_schedule(struct k_itimer *timer); 33