Blocking and non-blocking of Linux Device Drivers

Source: Internet
Author: User


In the Linux driver design, the blocking and non-blocking wait queues can be used to implement process blocking. The waiting queue can be seen as the container for storing the process. When the process is blocked, put the process into the waiting queue. when the process is awakened, It is retrieved from the waiting queue. Wait queue operation www.2cto.com definition wait queue my_queue initialization wait queue init_waitqueue_head (& my_queue) Definition and initialization wait queue (my_queue) www.2cto.com conditional sleep wait_event (queue, condition) sleep until condition is true, otherwise the Process status is TASK_UNINTERRUPTIBLE sleep mode wait_event_interruptible (queue, condition) and sleep until condition is true, otherwise, the Process status is TASK_INTERRUPTIBLE sleep mode www.2cto.com waiting for the wake-up of the queue wake_up from the waiting queue to the stopped status, TASK_INTERRUPTIBLE, and all worker processes of TASK_KILLABLE wake up from the waiting queue

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.