Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
posix-timers.h File Reference
#include <linux/spinlock.h>
#include <linux/list.h>
#include <linux/sched.h>
#include <linux/timex.h>
#include <linux/alarmtimer.h>

Go to the source code of this file.

Data Structures

union  cpu_time_count
 
struct  cpu_timer_list
 
struct  k_itimer
 
struct  k_clock
 

Macros

#define CPUCLOCK_PID(clock)   ((pid_t) ~((clock) >> 3))
 
#define CPUCLOCK_PERTHREAD(clock)   (((clock) & (clockid_t) CPUCLOCK_PERTHREAD_MASK) != 0)
 
#define CPUCLOCK_PERTHREAD_MASK   4
 
#define CPUCLOCK_WHICH(clock)   ((clock) & (clockid_t) CPUCLOCK_CLOCK_MASK)
 
#define CPUCLOCK_CLOCK_MASK   3
 
#define CPUCLOCK_PROF   0
 
#define CPUCLOCK_VIRT   1
 
#define CPUCLOCK_SCHED   2
 
#define CPUCLOCK_MAX   3
 
#define CLOCKFD   CPUCLOCK_MAX
 
#define CLOCKFD_MASK   (CPUCLOCK_PERTHREAD_MASK|CPUCLOCK_CLOCK_MASK)
 
#define MAKE_PROCESS_CPUCLOCK(pid, clock)   ((~(clockid_t) (pid) << 3) | (clockid_t) (clock))
 
#define MAKE_THREAD_CPUCLOCK(tid, clock)   MAKE_PROCESS_CPUCLOCK((tid), (clock) | CPUCLOCK_PERTHREAD_MASK)
 
#define FD_TO_CLOCKID(fd)   ((~(clockid_t) (fd) << 3) | CLOCKFD)
 
#define CLOCKID_TO_FD(clk)   ((unsigned int) ~((clk) >> 3))
 
#define REQUEUE_PENDING   1
 
#define TIMER_RETRY   1
 

Functions

void posix_timers_register_clock (const clockid_t clock_id, struct k_clock *new_clock)
 
int posix_timer_event (struct k_itimer *timr, int si_private)
 
void posix_cpu_timer_schedule (struct k_itimer *timer)
 
void run_posix_cpu_timers (struct task_struct *task)
 
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, cputime_t *newval, cputime_t *oldval)
 
long clock_nanosleep_restart (struct restart_block *restart_block)
 
void update_rlimit_cpu (struct task_struct *task, unsigned long rlim_new)
 

Variables

struct k_clock clock_posix_cpu
 
struct k_clock clock_posix_dynamic
 

Macro Definition Documentation

#define CLOCKFD   CPUCLOCK_MAX

Definition at line 44 of file posix-timers.h.

#define CLOCKFD_MASK   (CPUCLOCK_PERTHREAD_MASK|CPUCLOCK_CLOCK_MASK)

Definition at line 45 of file posix-timers.h.

#define CLOCKID_TO_FD (   clk)    ((unsigned int) ~((clk) >> 3))

Definition at line 53 of file posix-timers.h.

#define CPUCLOCK_CLOCK_MASK   3

Definition at line 39 of file posix-timers.h.

#define CPUCLOCK_MAX   3

Definition at line 43 of file posix-timers.h.

#define CPUCLOCK_PERTHREAD (   clock)    (((clock) & (clockid_t) CPUCLOCK_PERTHREAD_MASK) != 0)

Definition at line 34 of file posix-timers.h.

#define CPUCLOCK_PERTHREAD_MASK   4

Definition at line 37 of file posix-timers.h.

#define CPUCLOCK_PID (   clock)    ((pid_t) ~((clock) >> 3))

Definition at line 33 of file posix-timers.h.

#define CPUCLOCK_PROF   0

Definition at line 40 of file posix-timers.h.

#define CPUCLOCK_SCHED   2

Definition at line 42 of file posix-timers.h.

#define CPUCLOCK_VIRT   1

Definition at line 41 of file posix-timers.h.

#define CPUCLOCK_WHICH (   clock)    ((clock) & (clockid_t) CPUCLOCK_CLOCK_MASK)

Definition at line 38 of file posix-timers.h.

#define FD_TO_CLOCKID (   fd)    ((~(clockid_t) (fd) << 3) | CLOCKFD)

Definition at line 52 of file posix-timers.h.

#define MAKE_PROCESS_CPUCLOCK (   pid,
  clock 
)    ((~(clockid_t) (pid) << 3) | (clockid_t) (clock))

Definition at line 47 of file posix-timers.h.

#define MAKE_THREAD_CPUCLOCK (   tid,
  clock 
)    MAKE_PROCESS_CPUCLOCK((tid), (clock) | CPUCLOCK_PERTHREAD_MASK)

Definition at line 49 of file posix-timers.h.

#define REQUEUE_PENDING   1

Definition at line 64 of file posix-timers.h.

#define TIMER_RETRY   1

Definition at line 106 of file posix-timers.h.

Function Documentation

long clock_nanosleep_restart ( struct restart_block restart_block)

Definition at line 1060 of file posix-timers.c.

void posix_cpu_timer_schedule ( struct k_itimer timer)

Definition at line 1149 of file posix-cpu-timers.c.

void posix_cpu_timers_exit ( struct task_struct task)

Definition at line 495 of file posix-cpu-timers.c.

void posix_cpu_timers_exit_group ( struct task_struct task)

Definition at line 501 of file posix-cpu-timers.c.

int posix_timer_event ( struct k_itimer timr,
int  si_private 
)

Definition at line 339 of file posix-timers.c.

void posix_timers_register_clock ( const clockid_t  clock_id,
struct k_clock new_clock 
)

Definition at line 456 of file posix-timers.c.

void run_posix_cpu_timers ( struct task_struct task)

Definition at line 1282 of file posix-cpu-timers.c.

void set_process_cpu_timer ( struct task_struct task,
unsigned int  clock_idx,
cputime_t newval,
cputime_t oldval 
)

Definition at line 1350 of file posix-cpu-timers.c.

void update_rlimit_cpu ( struct task_struct task,
unsigned long  rlim_new 
)

Definition at line 19 of file posix-cpu-timers.c.

Variable Documentation

struct k_clock clock_posix_cpu

Definition at line 1567 of file posix-cpu-timers.c.

struct k_clock clock_posix_dynamic

Definition at line 437 of file posix-clock.c.