xref: /openbmc/linux/kernel/time/posix-timers.h (revision 30802945)
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);
22bab0aae9SThomas Gleixner };
23bab0aae9SThomas Gleixner 
24bab0aae9SThomas Gleixner extern const struct k_clock clock_posix_cpu;
25bab0aae9SThomas Gleixner extern const struct k_clock clock_posix_dynamic;
26bab0aae9SThomas Gleixner extern const struct k_clock clock_process;
27bab0aae9SThomas Gleixner extern const struct k_clock clock_thread;
28bab0aae9SThomas Gleixner extern const struct k_clock alarm_clock;
29bab0aae9SThomas Gleixner 
30bab0aae9SThomas Gleixner int posix_timer_event(struct k_itimer *timr, int si_private);
31bab0aae9SThomas Gleixner 
32bab0aae9SThomas Gleixner void posix_cpu_timer_schedule(struct k_itimer *timer);
33