#ifndef _linux_POSIX_TIMERS_H
#define _linux_POSIX_TIMERS_H
#include <linux/alarmtimer.h>
#include <linux/list.h>
#include <linux/mutex.h>
#include <linux/posix-timers_types.h>
#include <linux/spinlock.h>
#include <linux/timerqueue.h>
struct kernel_siginfo;
struct task_struct;
static inline clockid_t make_process_cpuclock(const unsigned int pid,
const clockid_t clock)
{ … }
static inline clockid_t make_thread_cpuclock(const unsigned int tid,
const clockid_t clock)
{ … }
static inline clockid_t fd_to_clockid(const int fd)
{ … }
static inline int clockid_to_fd(const clockid_t clk)
{ … }
#ifdef CONFIG_POSIX_TIMERS
struct cpu_timer { … };
static inline bool cpu_timer_enqueue(struct timerqueue_head *head,
struct cpu_timer *ctmr)
{ … }
static inline bool cpu_timer_queued(struct cpu_timer *ctmr)
{ … }
static inline bool cpu_timer_dequeue(struct cpu_timer *ctmr)
{ … }
static inline u64 cpu_timer_getexpires(struct cpu_timer *ctmr)
{ … }
static inline void cpu_timer_setexpires(struct cpu_timer *ctmr, u64 exp)
{ … }
static inline void posix_cputimers_init(struct posix_cputimers *pct)
{ … }
void posix_cputimers_group_init(struct posix_cputimers *pct, u64 cpu_limit);
static inline void posix_cputimers_rt_watchdog(struct posix_cputimers *pct,
u64 runtime)
{ … }
#define INIT_CPU_TIMERBASE(b) …
#define INIT_CPU_TIMERBASES(b) …
#define INIT_CPU_TIMERS(s) …
#else
struct cpu_timer { };
#define INIT_CPU_TIMERS …
static inline void posix_cputimers_init(struct posix_cputimers *pct) { }
static inline void posix_cputimers_group_init(struct posix_cputimers *pct,
u64 cpu_limit) { }
#endif
#ifdef CONFIG_POSIX_CPU_TIMERS_TASK_WORK
void clear_posix_cputimers_work(struct task_struct *p);
void posix_cputimers_init_work(void);
#else
static inline void clear_posix_cputimers_work(struct task_struct *p) { }
static inline void posix_cputimers_init_work(void) { }
#endif
#define REQUEUE_PENDING …
struct k_itimer { … };
void run_posix_cpu_timers(void);
void posix_cpu_timers_exit(struct task_struct *task);
void posix_cpu_timers_exit_group(struct task_struct *task);
void set_process_cpu_timer(struct task_struct *task, unsigned int clock_idx,
u64 *newval, u64 *oldval);
int update_rlimit_cpu(struct task_struct *task, unsigned long rlim_new);
void posixtimer_rearm(struct kernel_siginfo *info);
#endif