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