History

timer: add on-stack deferrable timer interfaces

In some cases (for instance with kernel threads) it may be desireable to use on-stack deferrable timers to get their power saving benefits. Add interfaces to support this for the IPS driver.

Jesse Barnes committed 16 years ago

Commit 8cadd281 parent 81f61482 files · +28 −0Browse files

Showing the changes to kernel/timer.c (1 of 2 files). Show all

Unified · Split

kernel/timer.c+13−0
@@ -577,6 +577,19 @@ static void __init_timer(struct timer_list *timer, · 576 unmodified lines
577 lockdep_init_map(&timer->lockdep_map, name, key, 0);577 lockdep_init_map(&timer->lockdep_map, name, key, 0);
578}578}
579 579
580void setup_deferrable_timer_on_stack_key(struct timer_list *timer,
581 const char *name,
582 struct lock_class_key *key,
583 void (*function)(unsigned long),
584 unsigned long data)
585{
586 timer->function = function;
587 timer->data = data;
588 init_timer_on_stack_key(timer, name, key);
589 timer_set_deferrable(timer);
590}
591EXPORT_SYMBOL_GPL(setup_deferrable_timer_on_stack_key);
592
580/**593/**
581 * init_timer_key - initialize a timer594 * init_timer_key - initialize a timer
582 * @timer: the timer to be initialized595 * @timer: the timer to be initialized

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t