History

workqueues: s/ON_STACK/ONSTACK/

Silly though it is, completions and wait_queue_heads use foo_ONSTACK (COMPLETION_INITIALIZER_ONSTACK, DECLARE_COMPLETION_ONSTACK, __WAIT_QUEUE_HEAD_INIT_ONSTACK and DECLARE_WAIT_QUEUE_HEAD_ONSTACK) so I guess workqueues should do the same thing. s/INIT_WORK_ON_STACK/INIT_WORK_ONSTACK/ s/INIT_DELAYED_WORK_ON_STACK/INIT_DELAYED_WORK_ONSTACK/

Andrew Morton committed 16 years ago

Commit ca1cab31 parent 99dc8295 files · +7 −7Browse files

Unified · Split

5 files
  1. arch/x86/kernel/hpet.c +1 −1
  2. arch/x86/kernel/smpboot.c +1 −1
  3. drivers/md/dm-snap-persistent.c +1 −1
  4. include/linux/workqueue.h +3 −3
  5. kernel/workqueue.c +1 −1
arch/x86/kernel/hpet.c+1−1
@@ -713,7 +713,7 @@ static int hpet_cpuhp_notify(struct notifier_block *n, · 712 unmodified lines
713 713
714 switch (action & 0xf) {714 switch (action & 0xf) {
715 case CPU_ONLINE:715 case CPU_ONLINE:
716 INIT_DELAYED_WORK_ON_STACK(&work.work, hpet_work);716 INIT_DELAYED_WORK_ONSTACK(&work.work, hpet_work);
717 init_completion(&work.complete);717 init_completion(&work.complete);
718 /* FIXME: add schedule_work_on() */718 /* FIXME: add schedule_work_on() */
719 schedule_delayed_work_on(cpu, &work.work, 0);719 schedule_delayed_work_on(cpu, &work.work, 0);
arch/x86/kernel/smpboot.c+1−1
@@ -747,7 +747,7 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu) · 746 unmodified lines
747 .done = COMPLETION_INITIALIZER_ONSTACK(c_idle.done),747 .done = COMPLETION_INITIALIZER_ONSTACK(c_idle.done),
748 };748 };
749 749
750 INIT_WORK_ON_STACK(&c_idle.work, do_fork_idle);750 INIT_WORK_ONSTACK(&c_idle.work, do_fork_idle);
751 751
752 alternatives_smp_switch(1);752 alternatives_smp_switch(1);
753 753
drivers/md/dm-snap-persistent.c+1−1
@@ -254,7 +254,7 @@ static int chunk_io(struct pstore *ps, void *area, chunk_t chunk, int rw, · 253 unmodified lines
254 * Issue the synchronous I/O from a different thread254 * Issue the synchronous I/O from a different thread
255 * to avoid generic_make_request recursion.255 * to avoid generic_make_request recursion.
256 */256 */
257 INIT_WORK_ON_STACK(&req.work, do_metadata);257 INIT_WORK_ONSTACK(&req.work, do_metadata);
258 queue_work(ps->metadata_wq, &req.work);258 queue_work(ps->metadata_wq, &req.work);
259 flush_workqueue(ps->metadata_wq);259 flush_workqueue(ps->metadata_wq);
260 260
include/linux/workqueue.h+3−3
@@ -190,7 +190,7 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; } · 189 unmodified lines
190 __INIT_WORK((_work), (_func), 0); \190 __INIT_WORK((_work), (_func), 0); \
191 } while (0)191 } while (0)
192 192
193#define INIT_WORK_ON_STACK(_work, _func) \193#define INIT_WORK_ONSTACK(_work, _func) \
194 do { \194 do { \
195 __INIT_WORK((_work), (_func), 1); \195 __INIT_WORK((_work), (_func), 1); \
196 } while (0)196 } while (0)
@@ -201,9 +201,9 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; } · 4 unmodified lines
201 init_timer(&(_work)->timer); \201 init_timer(&(_work)->timer); \
202 } while (0)202 } while (0)
203 203
204#define INIT_DELAYED_WORK_ON_STACK(_work, _func) \204#define INIT_DELAYED_WORK_ONSTACK(_work, _func) \
205 do { \205 do { \
206 INIT_WORK_ON_STACK(&(_work)->work, (_func)); \206 INIT_WORK_ONSTACK(&(_work)->work, (_func)); \
207 init_timer_on_stack(&(_work)->timer); \207 init_timer_on_stack(&(_work)->timer); \
208 } while (0)208 } while (0)
209 209
kernel/workqueue.c+1−1
@@ -2064,7 +2064,7 @@ static void insert_wq_barrier(struct cpu_workqueue_struct *cwq, · 2063 unmodified lines
2064 * checks and call back into the fixup functions where we2064 * checks and call back into the fixup functions where we
2065 * might deadlock.2065 * might deadlock.
2066 */2066 */
2067 INIT_WORK_ON_STACK(&barr->work, wq_barrier_func);2067 INIT_WORK_ONSTACK(&barr->work, wq_barrier_func);
2068 __set_bit(WORK_STRUCT_PENDING_BIT, work_data_bits(&barr->work));2068 __set_bit(WORK_STRUCT_PENDING_BIT, work_data_bits(&barr->work));
2069 init_completion(&barr->done);2069 init_completion(&barr->done);
2070 2070