Home
last modified time | relevance | path

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

/DragonOS-0.1.2/kernel/src/sched/
Dcompletion.c12 wait_queue_head_init(&x->wait_queue); in completion_init()
23 spin_lock(&x->wait_queue.lock); in complete()
27 wait_queue_wakeup_on_stack(&x->wait_queue, -1UL); // -1UL代表所有节点都满足条件,暂时这么写 in complete()
29 spin_unlock(&x->wait_queue.lock); in complete()
39 spin_lock(&x->wait_queue.lock); in complete_all()
42 while (!list_empty(&x->wait_queue.wait_list)) in complete_all()
43 wait_queue_wakeup_on_stack(&x->wait_queue, -1UL); // -1UL代表所有节点都满足条件,暂时这么写 in complete_all()
45 spin_unlock(&x->wait_queue.lock); in complete_all()
67 list_append(&x->wait_queue.wait_list, &wait.wait_list); in __wait_for_common()
70 spin_unlock(&x->wait_queue.lock); in __wait_for_common()
[all …]
/DragonOS-0.1.2/docs/kernel/sched/
Dwaiting.md5 ## 一. wait_queue等待队列
7   wait_queue是一种进程同步机制,中文名为“等待队列”。它可以将当前进程挂起,并在时机成熟时,由另一个进程唤醒他们。
9   当您需要等待一个事件完成时,使用wait_queue机制能减少进程同步的开销。相比于滥用自旋锁以及信号量,或者是循环使用usleep(1000)这样的函数来完成同步,wait…
12 `wait_queue.h`中的等待队列的实现并没有把队列头独立出来,同时没有考虑为等待队列加锁。所以在后来的开发中加入了`wait_queue_head_t`的队列头实现,实质上就是链表+自旋锁。…
23 &emsp;&emsp;要使用wait_queue,您需要`#include<common/wait_queue.h>`,并创建一个`wait_queue_node_t`类型的变量,作为等待队列的头…
43 …;&emsp;函数`wait_queue_init(wait_queue_node_t *wait_queue, struct process_control_block *pcb)`提供了初始化
45 &emsp;&emsp;当您初始化队列头部时,您仅需要将wait_queue首部的结点指针传入,第二个参数请设置为NULL
84 &emsp;&emsp; 等待队列头的使用逻辑与等待队列实际是一样的,因为他同样也是等待队列的节点(仅仅多了一把锁)。且wait_queue_head的函数基本上与wait_queue一致,只不过多…
86 &emsp;&emsp; 同时,wait_queue.h文件中提供了很多的宏,可以方便您的工作。
91 | DECLARE_WAIT_ON_STACK(name, pcb) | 在栈上声明一个wait_queue节点,同时把pcb所代表的进程与该节点绑定 |
[all …]
/DragonOS-0.1.2/kernel/src/libs/
Dsemaphore.c18 list_append(&sema->wait_queue.wait_list, &wait.wait_list); in semaphore_down()
27 if (list_empty(&sema->wait_queue.wait_list)) // 没有进程在等待资源 in semaphore_up()
34 …wait_queue_node_t *wq = container_of(list_next(&sema->wait_queue.wait_list), wait_queue_node_t, wa… in semaphore_up()
Dwait_queue_head.c11 void wait_queue_head_init(wait_queue_head_t *wait_queue) in wait_queue_head_init() argument
13 list_init(&wait_queue->wait_list); in wait_queue_head_init()
14 spin_init(&wait_queue->lock); in wait_queue_head_init()
Dwait_queue.c13 void wait_queue_init(wait_queue_node_t *wait_queue, struct process_control_block *pcb) in wait_queue_init() argument
15 list_init(&wait_queue->wait_list); in wait_queue_init()
16 wait_queue->pcb = pcb; in wait_queue_init()
Dmod.rs7 pub mod wait_queue; module
/DragonOS-0.1.2/kernel/src/common/
Dsemaphore.h24 wait_queue_node_t wait_queue; member
37 wait_queue_init(&sema->wait_queue, NULL); in semaphore_init()
Dwait_queue.h24 void wait_queue_init(wait_queue_node_t *wait_queue, struct process_control_block *pcb);
85 void wait_queue_head_init(wait_queue_head_t *wait_queue);
Dcompletion.h13 wait_queue_head_t wait_queue; member
Dblk_types.h47 wait_queue_node_t wait_queue; member
/DragonOS-0.1.2/docs/introduction/
Dfeatures.md41 - [x] wait_queue等待队列
/DragonOS-0.1.2/kernel/src/driver/disk/ahci/
Dahci.c553 wait_queue_init(&pack->blk_pak.wait_queue, current_pcb); in ahci_make_request()
588 ahci_req_queue.in_service->wait_queue.pcb->state = PROC_RUNNING; in ahci_end_request()
602 …ci_request_packet_t *)container_of(wait_queue_tmp, struct block_device_request_packet, wait_queue); in ahci_query_disk()
605 list_del(&(ahci_req_queue.in_service->wait_queue.wait_list)); in ahci_query_disk()
635 list_append(&(ahci_req_queue.wait_queue_list.wait_list), &(pack->blk_pak.wait_queue.wait_list)); in ahci_submit()
/DragonOS-0.1.2/docs/community/ChangeLog/V0.1.x/
DV0.1.0.md110 - wait_queue 等待队列