函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\workqueue.c Create Date:2022-07-27 10:26:31
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:pwq_dec_nr_in_flight - decrement pwq's nr_in_flight*@pwq: pwq of interest*@color: color of work which left the queue* A work either has completed or is removed from pending queue,* decrement nr_in_flight of its pwq and handle workqueue flushing.* CONTEXT:

函数原型:static void pwq_dec_nr_in_flight(struct pool_workqueue *pwq, int color)

返回类型:void

参数:

类型参数名称
struct pool_workqueue *pwq
intcolor
1169  如果color恒等于WORK_NO_COLOR则转到:out_put
1172  nr_in_flight[color]自减
1174  L: nr of active works 自减
1175  如果非链表为空
1177  如果L: nr of active works 小于L: max active works pwq_activate_first_delayed(pwq)
1182  如果此条件成立可能性大(为编译器优化)(L: flushing color != color)则转到:out_put
1186  如果nr_in_flight[color]则转到:out_put
1190  L: flushing color 等于负1
1196  如果atomic_dec_and_test( & nr_pwqs_to_flush)则complete( & done)
1198  out_put :
1199  put_pwq - put a pool_workqueue reference*@pwq: pool_workqueue to put* Drop a reference of @pwq. If its refcnt reaches zero, schedule its* destruction. The caller should be holding the matching pool->lock.
调用者
名称描述
try_to_grab_pendingry_to_grab_pending - steal work item from worklist and disable irq*@work: work item to steal*@is_dwork: @work is a delayed_work*@flags: place to store irq state* Try to grab PENDING bit of @work. This function can handle @work in any
process_one_workprocess_one_work - process single work*@worker: self*@work: work to process* Process @work