函数逻辑报告 |
Source Code:kernel\workqueue.c |
Create Date:2022-07-27 10:26:39 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:__queue_work
函数原型:static void __queue_work(int cpu, struct workqueue_struct *wq, struct work_struct *work)
返回类型:void
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| int | cpu | |
| struct workqueue_struct * | wq | |
| struct work_struct * | work |
| 1404 | lockdep_assert_irqs_disabled() |
| 1406 | debug_work_activate(work) |
| 1413 | retry : |
| 1418 | 如果非hot fields used during command issue, aligned to cacheline 按位与WQ_UNBOUND的值则pwq等于per_cpu_ptr(I: per-cpu pwqs , cpu) |
| 1429 | 如果last_pool且last_pool不等于I: the associated pool 则 |
| 1432 | 加自旋锁 |
| 1437 | pwq等于L: current_work's pwq |
| 1438 | 否则 |
| 1443 | 否则 |
| 1444 | 加自旋锁 |
| 1455 | 如果此条件成立可能性小(为编译器优化)(!L: reference count )则 |
| 1462 | WARN_ONCE(true, "workqueue: per-cpu pwq for %s on cpu%d has 0 refcnt", I: workqueue name , cpu) |
| 1472 | nr_in_flight[L: current color ]自加 |
| 1477 | L: nr of active works 自加 |
| 1479 | 如果链表为空则L: watchdog timestamp 等于jiffies |
| 1481 | 否则 |
| 1482 | work_flags或等于WORK_STRUCT_DELAYED |
| 1483 | worklist等于L: delayed works |
| 1488 | out : |
| 1489 | 自旋锁解锁 |
| 名称 | 描述 |
|---|---|
| queue_work_on | queue_work_on - queue work on specific cpu*@cpu: CPU number to execute work on*@wq: workqueue to use*@work: work to queue* We queue the work to a specific CPU, the caller must ensure it* can't go away. |
| queue_work_node | queue_work_node - queue work on a "random" cpu for a given NUMA node*@node: NUMA node that we are targeting the work for*@wq: workqueue to use*@work: work to queue* We queue the work to a "random" CPU within a given NUMA node |
| delayed_work_timer_fn | |
| __queue_delayed_work | |
| rcu_work_rcufn | |
| flush_delayed_work | lush_delayed_work - wait for a dwork to finish executing the last queueing*@dwork: the delayed work to flush* Delayed timer is cancelled and the pending work is queued for* immediate execution. Like flush_work(), this function only |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |