tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Missing rump_kthread_destroy() ?



paul%vps1.whooppee.com@localhost (Paul Goyette) writes:


>>> Is there a reason for not providing kthread_destroy()?  How difficult
>>> would it be to add it?
>> The right thing to use is kthread_exit().

>Doesn't kthread_exit() need to be called from within the victim/target ?

>Would it be "reasonable" (for some value thereof) for the module cleanup 
>routine to set a flag "please_exit" and then call kthread_join().  Then 
>the target thread can check the flag and exit if set.


That's what sysmon does in sysmon_task_queue_fini(). Set a flag and
signal the thread to exit, then wait until the thread has cleared
the flag again to ensure that the thread has exited.

kthread_join() would have done the same thing.

-- 
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index