Function report |
Source Code:kernel\workqueue.c |
Create Date:2022-07-28 09:26:59 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:drain_workqueue - drain a workqueue*@wq: workqueue to drain* Wait until the workqueue becomes empty. While draining is in progress,* only chain queueing is allowed. IOW, only currently pending or running
Proto:void drain_workqueue(struct workqueue_struct *wq)
Type:void
Parameter:
Type | Parameter | Name |
---|---|---|
struct workqueue_struct * | wq |
2927 | flush_cnt = 0 |
2935 | mutex_lock( & protects this wq ) |
2936 | If Not WQ: drain in progress ++ Then hot fields used during command issue, aligned to cacheline |= __WQ_DRAINING |
2938 | mutex_unlock( & protects this wq ) |
2939 | reflush : |
2942 | mutex_lock( & protects this wq ) |
2947 | spin_lock_irq( & he pool lock ) |
2948 | drained = Not L: nr of active works && list_empty - tests whether a list is empty*@head: the list to test. |
2949 | spin_unlock_irq( & he pool lock ) |
2951 | If drained Then Continue |
2954 | If ++flush_cnt == 10 || flush_cnt % 100 == 0 && flush_cnt <= 1000 Then pr_warn("workqueue %s: drain_workqueue() isn't complete after %u tries\n", I: workqueue name , flush_cnt) |
2959 | mutex_unlock( & protects this wq ) |
2960 | Go to reflush |
2963 | If Not --WQ: drain in progress Then hot fields used during command issue, aligned to cacheline &= ~__WQ_DRAINING |
2965 | mutex_unlock( & protects this wq ) |
Name | Describe |
---|---|
destroy_workqueue | destroy_workqueue - safely terminate a workqueue*@wq: target workqueue* Safely destroy a workqueue. All work currently pending will be done first. |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |