Skip to contentSkip to conversation

cleanup: kthread workqueue rename

PATCH In review Coywolf Qi Hunt 2 participants 3 messages Jun 22, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cleanup: kthread workqueue rename

cleanup: rename kthread helper_wq to kthread_wq.

---

kernel/kthread.c +7 -7
index c5f3c66..3184c94 100644
@@ -19,7 +19,7 @@ #include <asm/semaphore.h>
  * We dont want to execute off keventd since it might
  * hold a semaphore our callers hold too:
  */
-static struct workqueue_struct *helper_wq;
+static struct workqueue_struct *kthread_wq;
 
 struct kthread_create_info
 {
@@ -138,10 +138,10 @@ struct task_struct *kthread_create(int (
 	/*
 	 * The workqueue needs to start up first:
 	 */
-	if (!helper_wq)
+	if (!kthread_wq)
 		work.func(work.data);
 	else {
-		queue_work(helper_wq, &work);
+		queue_work(kthread_wq, &work);
 		wait_for_completion(&create.done);
 	}
 	if (!IS_ERR(create.result)) {
@@ -203,12 +203,12 @@ int kthread_stop_sem(struct task_struct 
 }
 EXPORT_SYMBOL(kthread_stop_sem);
 
-static __init int helper_init(void)
+static __init int kthread_init(void)
 {
-	helper_wq = create_singlethread_workqueue("kthread");
-	BUG_ON(!helper_wq);
+	kthread_wq = create_singlethread_workqueue("kthread");
+	BUG_ON(!kthread_wq);
 
 	return 0;
 }
-core_initcall(helper_init);
+core_initcall(kthread_init);
 
Signature · 1 line
Coywolf Qi Hunt
#1 lore raw

kernel/kthread.c #include <asm/semaphore.h> · line 22

Quoted 2 lines · On Thu, 22 Jun 2006 16:29:12 +0800 Coywolf Qi Hunt <[email protected]> wrote:
kernel/kthread.c +1 -1
-static struct workqueue_struct *helper_wq;
+static struct workqueue_struct *kthread_wq;

"helper" is better. It's there to help kthread launching and that's all it does. So "helper" is a more specific identification.

#2 lore raw
Quoted 8 lines · Andrew Morton

kernel/kthread.c #include <asm/semaphore.h> · line 22

Quoted 2 lines · On Thu, 22 Jun 2006 16:29:12 +0800 Coywolf Qi Hunt <[email protected]> wrote:
kernel/kthread.c +1 -1
-static struct workqueue_struct *helper_wq;
+static struct workqueue_struct *kthread_wq;

"helper" is better. It's there to help kthread launching and that's all it does. So "helper" is a more specific identification.

So "khelper_wq" should better be "helper_wq" too?

    khelper_wq = create_singlethread_workqueue("khelper");

'helper_wq' becomes [kthread] as shown in ps ax; I don't think it is a 'helper'.

    5 ?        S<     0:00 [khelper]
    6 ?        S<     0:00 [kthread]

That vague name makes me easily forget what I am looking at. Please apply.

Signature · 1 line
Coywolf Qi Hunt