public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Teoh <htmldeveloper@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Removing kernel_thread() from stop_machine.c
Date: Fri, 07 Mar 2008 16:50:40 +0800	[thread overview]
Message-ID: <47D101E0.6040802@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 139 bytes --]


I replaced the kernel_thread() API in stop_machine.c as per document:   
Documentation/feature-removal-schedule.txt.

Please comment.





[-- Attachment #2: remove_kernel_thread_stop_machine.patch --]
[-- Type: text/x-patch, Size: 932 bytes --]

Signed-off-by: Peter Teoh <htmldeveloper@gmail.com>

--- kernel/stop_machine.c.orig	2008-03-07 13:20:00.000000000 +0800
+++ kernel/stop_machine.c	2008-03-07 16:45:30.000000000 +0800
@@ -9,6 +9,7 @@
 #include <linux/stop_machine.h>
 #include <linux/syscalls.h>
 #include <linux/interrupt.h>
+#include <linux/kthread.h>
 
 #include <asm/atomic.h>
 #include <asm/semaphore.h>
@@ -92,6 +93,7 @@ static void stopmachine_set_state(enum s
 static int stop_machine(void)
 {
 	int i, ret = 0;
+	struct task_struct *task;
 
 	atomic_set(&stopmachine_thread_ack, 0);
 	stopmachine_num_threads = 0;
@@ -100,7 +102,8 @@ static int stop_machine(void)
 	for_each_online_cpu(i) {
 		if (i == raw_smp_processor_id())
 			continue;
-		ret = kernel_thread(stopmachine, (void *)(long)i,CLONE_KERNEL);
+		task = kthread_create(stopmachine, (void *)(long)i,"stopmachine");
+		ret = PTR_ERR(task);
 		if (ret < 0)
 			break;
 		stopmachine_num_threads++;

                 reply	other threads:[~2008-03-07  8:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47D101E0.6040802@gmail.com \
    --to=htmldeveloper@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox