lkml.org 
[lkml]   [2008]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRemoving kernel_thread() from stop_machine.c

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

    Please comment.




    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++;
    \
     
     \ /
      Last update: 2008-03-07 09:41    [W:0.046 / U:59.472 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site