How do I call down in the kernel thread created by kthread_create?
Source: Internet
Author: User
How do I call down in the kernel thread created by kthread_create? -- Linux general technology-Linux programming and kernel information. The following is a detailed description. When the module is loaded, thread A is created through kthread_create, and its running and sleep status are controlled through down and up. However, when the module is detached, it is found that the thread cannot be terminated through kthread_stop, is there any solution? Or can I only use schedule?
I mainly want A to process the command queue Q cyclically, but some command states in Q are not all processed. For example, if the command states are 1, 2, 3, 4, 5, and only 1, 5 need to be processed, however, if A does not stop traversing queue Q processing, the efficiency is very low. If A wants to sleep after A queue is traversed every time, it will wake up A when the status changes. What is the best solution?
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service