Searched refs:WaitQueue (Results 1 – 7 of 7) sorted by relevance
5 ## 1. WaitQueue等待队列7    WaitQueue是一种进程同步机制,中文名为“等待队列”。它可以将当前进程挂起,并在时机成熟时,由另一个进程唤醒他们。9   当您需要等待一个事件完成时,使用 WaitQueue机制能减少进程同步的开销。相比于滥用自旋锁以及信号量,或者是循环使用usleep(1000)这样的函数来完成同步, Wai…11 ### 1.1 WaitQueue的使用13    WaitQueue的使用非常简单,只需要三步:15 1. 初始化一个WaitQueue对象。16 2. 调用这个WaitQueue的挂起相关的API,将当前进程挂起。17 3. 当事件发生时,由另一个进程,调用这个WaitQueue的唤醒相关的API,唤醒一个进程。21 ### 1.1.1 初始化一个WaitQueue对象23    WaitQueue对象的初始化非常简单,只需要调用WaitQueue::INIT即可。[all …]
5 use super::wait_queue::WaitQueue;11 wait_queue: WaitQueue,25 wait_queue: WaitQueue::INIT, in new()
38 pub struct WaitQueue(SpinLock<InnerWaitQueue>); struct40 impl WaitQueue { implementation41 pub const INIT: WaitQueue = WaitQueue(SpinLock::new(InnerWaitQueue::INIT));
9 libs::{spinlock::SpinLock, wait_queue::WaitQueue},30 read_wait_queue: WaitQueue,31 write_wait_queue: WaitQueue,44 read_wait_queue: WaitQueue::INIT, in new()45 write_wait_queue: WaitQueue::INIT, in new()
38 - WaitQueue: new: Rust版本的WaitQueue (#162)39 - WaitQueue: update: C版本的wait_queue的唤醒,改为立即唤醒 (#158)
201 2.WaitQueue增加wakeup_all的功能
17 wait_queue::WaitQueue,28 pub static ref SOCKET_WAITQUEUE: WaitQueue = WaitQueue::INIT;