[lkml]   [2005]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Stopping Kernel Threads at module unload time

> 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
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-11-09 17:59    [W:0.042 / U:48.388 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site