c - Best choice to recover a unix device driver by killing a kthread -


i don't see kthread_destroy linux, netbsd.

which best approach kill kthread , start again ?

linux doesn't support killing kernel thread. ask stop, wait (there's no provision buggy kernel modules). way, doesn't disappear leaving system resources -- locks, allocated memory, , forth -- in indeterminate state.

typically use kthread_create create thread, , kthread_stop ask thread stop. meanwhile thread sits in loop doing this:

while (!kthread_should_stop()) {    /* ... stuff */ } return 0; 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -