aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/workqueue.h
diff options
context:
space:
mode:
authorVenki Pallipadi <venkatesh.pallipadi@intel.com>2007-05-08 03:27:47 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 14:15:05 -0400
commit28287033e12463c8ff89f1ea8038783d0360391c (patch)
tree27eabb2890dd1e2e30363dee2f4263cbee906a42 /include/linux/workqueue.h
parent6e453a67510a17f01b63835f18569e8c3939a38c (diff)
Add a new deferrable delayed work init
Add a new deferrable delayed work init. This can be used to schedule work that are 'unimportant' when CPU is idle and can be called later, when CPU eventually comes out of idle. Use this init in cpufreq ondemand governor. Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Cc: Dave Jones <davej@codemonkey.org.uk> Cc: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/workqueue.h')
-rw-r--r--include/linux/workqueue.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index b8abfc74d038..f16ba1e0687d 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -121,6 +121,12 @@ struct execute_work {
121 init_timer(&(_work)->timer); \ 121 init_timer(&(_work)->timer); \
122 } while (0) 122 } while (0)
123 123
124#define INIT_DELAYED_WORK_DEFERRABLE(_work, _func) \
125 do { \
126 INIT_WORK(&(_work)->work, (_func)); \
127 init_timer_deferrable(&(_work)->timer); \
128 } while (0)
129
124/** 130/**
125 * work_pending - Find out whether a work item is currently pending 131 * work_pending - Find out whether a work item is currently pending
126 * @work: The work item in question 132 * @work: The work item in question