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