diff options
author | David Howells <dhowells@redhat.com> | 2006-11-22 09:54:45 -0500 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2006-11-22 09:54:45 -0500 |
commit | 6bb49e5965c1fc399b4d3cd2b5cf2da535b330c0 (patch) | |
tree | ebf48d3bb43c8dbf65d2653b8810973e69d3517e /kernel/workqueue.c | |
parent | 52bad64d95bd89e08c49ec5a071fa6dcbe5a1a9c (diff) |
WorkStruct: Typedef the work function prototype
Define a type for the work function prototype. It's not only kept in the
work_struct struct, it's also passed as an argument to several functions.
This makes it easier to change it.
Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r-- | kernel/workqueue.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 44fc54b7decf..1e9d61ecf762 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -217,7 +217,7 @@ static void run_workqueue(struct cpu_workqueue_struct *cwq) | |||
217 | while (!list_empty(&cwq->worklist)) { | 217 | while (!list_empty(&cwq->worklist)) { |
218 | struct work_struct *work = list_entry(cwq->worklist.next, | 218 | struct work_struct *work = list_entry(cwq->worklist.next, |
219 | struct work_struct, entry); | 219 | struct work_struct, entry); |
220 | void (*f) (void *) = work->func; | 220 | work_func_t f = work->func; |
221 | void *data = work->data; | 221 | void *data = work->data; |
222 | 222 | ||
223 | list_del_init(cwq->worklist.next); | 223 | list_del_init(cwq->worklist.next); |
@@ -513,7 +513,7 @@ EXPORT_SYMBOL(schedule_delayed_work_on); | |||
513 | * | 513 | * |
514 | * schedule_on_each_cpu() is very slow. | 514 | * schedule_on_each_cpu() is very slow. |
515 | */ | 515 | */ |
516 | int schedule_on_each_cpu(void (*func)(void *info), void *info) | 516 | int schedule_on_each_cpu(work_func_t func, void *info) |
517 | { | 517 | { |
518 | int cpu; | 518 | int cpu; |
519 | struct work_struct *works; | 519 | struct work_struct *works; |
@@ -578,7 +578,7 @@ EXPORT_SYMBOL(cancel_rearming_delayed_work); | |||
578 | * Returns: 0 - function was executed | 578 | * Returns: 0 - function was executed |
579 | * 1 - function was scheduled for execution | 579 | * 1 - function was scheduled for execution |
580 | */ | 580 | */ |
581 | int execute_in_process_context(void (*fn)(void *data), void *data, | 581 | int execute_in_process_context(work_func_t fn, void *data, |
582 | struct execute_work *ew) | 582 | struct execute_work *ew) |
583 | { | 583 | { |
584 | if (!in_interrupt()) { | 584 | if (!in_interrupt()) { |