Home
last modified time | relevance | path

Searched refs:wait_queue (Results 1 – 16 of 16) sorted by relevance

/DragonOS/docs/kernel/sched/
H A Dc_waiting.md11 ## 一. wait_queue等待队列
13   wait_queue是一种进程同步机制,中文名为“等待队列”。它可以将当前进程挂起,并在时机成熟时,由另一个进程唤醒他们。
15   当您需要等待一个事件完成时,使用wait_queue机制能减少进程同步的开销。相比于滥用自旋锁以及信号量,或者是循环使用usleep(1000)这样的函数来完成同步,wait…
18 `wait_queue.h`中的等待队列的实现并没有把队列头独立出来,同时没有考虑为等待队列加锁。所以在后来的开发中加入了`wait_queue_head_t`的队列头实现,实质上就是链表+自旋锁。…
29 &emsp;&emsp;要使用wait_queue,您需要`#include<common/wait_queue.h>`,并创建一个`wait_queue_node_t`类型的变量,作为等待队列的头…
49 …;&emsp;函数`wait_queue_init(wait_queue_node_t *wait_queue, struct process_control_block *pcb)`提供了初始化
51 &emsp;&emsp;当您初始化队列头部时,您仅需要将wait_queue首部的结点指针传入,第二个参数请设置为NULL
90 &emsp;&emsp; 等待队列头的使用逻辑与等待队列实际是一样的,因为他同样也是等待队列的节点(仅仅多了一把锁)。且wait_queue_head的函数基本上与wait_queue一致,只不过多…
92 &emsp;&emsp; 同时,wait_queue.h文件中提供了很多的宏,可以方便您的工作。
97 | DECLARE_WAIT_ON_STACK(name, pcb) | 在栈上声明一个wait_queue节点,同时把pcb所代表的进程与该节点绑定 |
[all …]
/DragonOS/kernel/src/libs/
H A Dsemaphore.rs8 use super::wait_queue::WaitQueue;
14 wait_queue: WaitQueue, field
28 wait_queue: WaitQueue::default(), in new()
40 self.wait_queue.sleep(); in down()
49 if self.wait_queue.len() > 0 { in up()
53 if !self.wait_queue.wakeup(None) { in up()
H A Dmod.rs26 pub mod wait_queue; module
/DragonOS/kernel/src/sched/
H A Dcompletion.rs6 libs::{spinlock::SpinLock, wait_queue::WaitQueue},
43 unsafe { inner.wait_queue.sleep_without_schedule() }; in do_wait_for_common()
45 unsafe { inner.wait_queue.sleep_without_schedule_uninterruptible() }; in do_wait_for_common()
54 inner.wait_queue.wakeup(None); in do_wait_for_common()
97 inner.wait_queue.wakeup(None); in complete()
105 inner.wait_queue.wakeup_all(None); in complete_all()
145 wait_queue: WaitQueue, field
152 wait_queue: WaitQueue::default(), in new()
/DragonOS/kernel/src/filesystem/
H A Deventfd.rs5 use crate::libs::wait_queue::WaitQueue;
54 wait_queue: WaitQueue, field
62 wait_queue: WaitQueue::default(), in new()
128 let r = wq_wait_event_interruptible!(self.wait_queue, self.readable(), {}); in read_at()
188 self.wait_queue.sleep(); in write_at()
192 self.wait_queue.wakeup_all(None); in write_at()
/DragonOS/kernel/src/net/socket/
H A Dmod.rs27 wait_queue::EventWaitQueue,
407 wait_queue: Arc<EventWaitQueue>, field
413 pub fn new(wait_queue: Option<Arc<EventWaitQueue>>) -> Self { in new()
415 wait_queue: wait_queue.unwrap_or(Arc::new(EventWaitQueue::new())), in new()
423 self.wait_queue.sleep_without_schedule(events); in sleep()
455 self.wait_queue.wakeup_any(events); in wakeup_any()
/DragonOS/kernel/src/process/
H A Dexit.rs148 child_weak.upgrade().unwrap().wait_queue.sleep(); in do_wait()
165 unsafe { pcb.wait_queue.sleep_without_schedule() }; in do_wait()
H A Dmod.rs45 wait_queue::WaitQueue,
392 pcb.wait_queue.wakeup(Some(ProcessState::Blocked(true))); in exit()
651 wait_queue: WaitQueue, field
749 wait_queue: WaitQueue::default(), in do_create_pcb()
/DragonOS/docs/community/ChangeLog/V0.1.x/
H A DV0.1.4.md39 - WaitQueue: update: C版本的wait_queue的唤醒,改为立即唤醒 (#158)
133 3、wait_queue的唤醒,改为立即唤醒。
H A DV0.1.0.md110 - wait_queue 等待队列
/DragonOS/docs/introduction/
H A Dfeatures.md46 - [x] wait_queue等待队列
/DragonOS/kernel/src/namespaces/
H A Dmnt_namespace.rs24 use crate::libs::wait_queue::WaitQueue;
/DragonOS/kernel/src/ipc/
H A Dpipe.rs8 wait_queue::WaitQueue,
/DragonOS/kernel/src/driver/base/device/
H A Ddd.rs15 libs::wait_queue::WaitQueue,
/DragonOS/kernel/src/net/event_poll/
H A Dmod.rs24 wait_queue::WaitQueue,
/DragonOS/kernel/src/driver/tty/
H A Dtty_core.rs18 wait_queue::EventWaitQueue,