Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
itimer.c File Reference
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <linux/syscalls.h>
#include <linux/time.h>
#include <linux/posix-timers.h>
#include <linux/hrtimer.h>
#include <trace/events/timer.h>
#include <asm/uaccess.h>

Go to the source code of this file.

Macros

#define timeval_valid(t)   (((t)->tv_sec >= 0) && (((unsigned long) (t)->tv_usec) < USEC_PER_SEC))
 

Functions

int do_getitimer (int which, struct itimerval *value)
 
 SYSCALL_DEFINE2 (getitimer, int, which, struct itimerval __user *, value)
 
enum hrtimer_restart it_real_fn (struct hrtimer *timer)
 
int do_setitimer (int which, struct itimerval *value, struct itimerval *ovalue)
 
unsigned int alarm_setitimer (unsigned int seconds)
 
 SYSCALL_DEFINE3 (setitimer, int, which, struct itimerval __user *, value, struct itimerval __user *, ovalue)
 

Macro Definition Documentation

#define timeval_valid (   t)    (((t)->tv_sec >= 0) && (((unsigned long) (t)->tv_usec) < USEC_PER_SEC))

Definition at line 187 of file itimer.c.

Function Documentation

unsigned int alarm_setitimer ( unsigned int  seconds)

alarm_setitimer - set alarm in seconds

: number of seconds until alarm 0 disables the alarm

Returns the remaining time in seconds of a pending timer or 0 when the timer is not active.

On 32 bit machines the seconds value is limited to (INT_MAX/2) to avoid negative timeval settings which would cause immediate expiry.

Definition at line 253 of file itimer.c.

int do_getitimer ( int  which,
struct itimerval value 
)

Definition at line 79 of file itimer.c.

int do_setitimer ( int  which,
struct itimerval value,
struct itimerval ovalue 
)

Definition at line 190 of file itimer.c.

enum hrtimer_restart it_real_fn ( struct hrtimer timer)

Definition at line 121 of file itimer.c.

SYSCALL_DEFINE2 ( getitimer  ,
int  ,
which  ,
struct itimerval __user ,
value   
)

Definition at line 103 of file itimer.c.

SYSCALL_DEFINE3 ( setitimer  ,
int  ,
which  ,
struct itimerval __user ,
value  ,
struct itimerval __user ,
ovalue   
)

Definition at line 278 of file itimer.c.