lkml.org 
[lkml]   [2005]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Stopping Kernel Threads at module unload time
    Hello,

    > This is how the kernel thread is stopped.
    >
    > if(info->pid)
    > {
    > (void)kill_proc(info->pid, SIGTERM, 1);
    > wait_for_completion(&info->quit);
    > }
    >

    I actually would prefer to do it with the new kernel thread API.
    So, to create the thread: kthread_create
    bind it to a cpu: kthread_bind
    stop it: kthread_stop

    Now, if I call kthread_stop() in module unload time, does that code
    run in user process context just like system calls do? That is
    important, because if it cannot sleep, it would deadlock.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-11-09 17:59    [W:0.022 / U:0.092 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site