On Mon, Aug 11, 2014 at 03:34:48PM +0100, David Vrabel wrote:
[...]
quoted
quoted
And cleaning it up a bit (the while() could be a for(;;)).
Unfortunately this approach is bogus. If xenbus thread is not blocked it
can free up various resources while dealloc thread is running -- queue
can be gone under dealloc thread's feet.
kthread_stop() waits until the thread exits (like pthread_join()).
/**
* kthread_stop - stop a thread created by kthread_create().
* @k: thread created by kthread_create().
*
* Sets kthread_should_stop() for @k to return true, wakes it, and
* waits for it to exit.
Ah, misremeber the behaviour of kthread_stop. Sorry for the noise.
Wei.
David