STRUCT HRTIMER(9) Driver Basics STRUCT HRTIMER(9)NAME
struct_hrtimer - the basic hrtimer structure
SYNOPSIS
struct hrtimer {
struct timerqueue_node node;
ktime_t _softexpires;
enum hrtimer_restart (* function) (struct hrtimer *);
struct hrtimer_clock_base * base;
unsigned long state;
#ifdef CONFIG_TIMER_STATS
int start_pid;
void * start_site;
char start_comm[16];
#endif
};
MEMBERS
node
timerqueue node, which also manages node.expires, the absolute expiry time in the hrtimers internal representation. The time is related
to the clock on which the timer is based. Is setup by adding slack to the _softexpires value. For non range timers identical to
_softexpires.
_softexpires
the absolute earliest expiry time of the hrtimer. The time which was given as expiry time when the timer was armed.
function
timer expiry callback function
base
pointer to the timer base (per cpu and per clock)
state
state information (See bit values above)
start_pid
timer statistics field to store the pid of the task which started the timer
start_site
timer statistics field to store the site where the timer was started
start_comm[16]
timer statistics field to store the name of the process which started the timer
DESCRIPTION
The hrtimer structure must be initialized by hrtimer_init
COPYRIGHT Kernel Hackers Manual 3.10 June 2014 STRUCT HRTIMER(9)
Check Out this Related Man Page
mktimer(3C)mktimer(3C)NAME
mktimer - allocate a per-process timer
SYNOPSIS DESCRIPTION
The function is used to allocate a per-process timer using the specified system-wide clock as the timing base. returns an unique timer ID
of type used to identify the timer in timer requests (see gettimer(3C)). specifies the system-wide clock to be used as the timing base for
the new timer. specifies the mechanism by which the process is to be notified when the timer expires.
supports one per-process timer with a of and of
If is the system causes a signal to be sent to the process whenever the timer expires.
For the machine-dependent clock resolution and maximum value are and seconds, respectively. These constants are defined in
RETURN VALUE
Upon successful completion, returns a which can be passed to the per_process timer calls. If unsuccessful, returns a value of and sets to
indicate the error.
ERRORS
fails if any of the following conditions are encountered:
[EAGAIN] The calling process has already allocated all of the timers it is allowed.
[EINVAL] is not defined, or does not allow the specified notification mechanism.
FILES
SEE ALSO
timers(2), getclock(3C), gettimer(3C), reltimer(3C), rmtimer(3C), setclock(3C), thread_safety(5).
STANDARDS CONFORMANCE mktimer(3C)
Man Page
15 More Discussions You Might Find Interesting
1. Post Here to Contact Site Administrators and Moderators
Neo,
can u please shorten the reply timer to like 1 min or so. It is prolly just me but i end up passing on replying to posts due to i hate waiting for my timer to reset w/ a 2.5 mins wait. (2 Replies)
I should use a pointer or a struct as the head of a linklist. I want use the linklist as the data structure for graph.
Such as
struct node {
int vertex;
struct node * next;
};
typedef struct node NT;
struct list{
int row;
NT * neighbour;
struct list * next;
}
typedef... (2 Replies)
hi,
i hav array of following struct which contains 50 elements. I want to
print only first feild of the struct ie name field in GDB debuggure.
struct node {
char name ;
int age;
char sex;
int location
} SS
... (4 Replies)
Hi,
Can you please help me in implementing a timer based polling for function in C? ie. the function should be called in say 30secs(when 30secs has lapsed).
Thanks (7 Replies)
Hi
I have questions about timer function in multi-threads environment.
My application has multi-threads, in one thread, I set a timer, when the timer expires, the timer function will interrupt other thread and execute.
I am not clear which thread will be interrupted by the timer function ?... (2 Replies)
Hi,
Can anyone suggest, how or from where we can understand the expiry time of a linux id, whether login or ftp?
My concern is like, i want to know when the ftpid configured on an automated system will expire, so that i can configure some notice or email mentioning that the particular id... (1 Reply)
if i create an array of pointers to a structure "struct node" as:
struct node *r;
and create "n" number of "linked lists" and assign it to the various struct pointers r using some function with a return type as structure pointer as:
r=multiplty(.......) /*some parameters*/
is... (2 Replies)
Hello, I have another problem with my script - I would like to have a countdown timer visible on the screen, and at the same time, I want te be able to do something else. And when the time runs out, I need to know about that inside the script somehow and do some action. I guess that would require 2... (3 Replies)
Hi All,
I want to write a script that will send the alert when linux server password expiry for user 'x' is less than 12 days.
I have written the below script but this is not working for expiry date 04 july
script;-
P_EXPIRY_DATE=`chage -l msdp| grep 'Password expires' | awk ' {... (2 Replies)
The book The Design of the Unix Operating System speaks of a clock or timer that is used in scheduling. The clock generates interrupts that update priority information for processes and preempt processes in a round-robin fashion. It's apparent that this "clock" is not the same thing as the CPU... (1 Reply)
Hi,
I have a requirement to check the expiry date of Java software installed in linux servers.
We are using the below Java
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
I am not sure... (3 Replies)
I have 2 files that print on the same line at the same time. I wanted to add time.sleep() to 1 of the textfiles. I wanted to delay the time that 1 textfile prints with the other 1 in this script. I wanted to have the files to create new lines instead of printing the same combinations when they both... (5 Replies)