Function report |
Source Code:kernel\workqueue.c |
Create Date:2022-07-28 09:26:18 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:__queue_work
Proto:static void __queue_work(int cpu, struct workqueue_struct *wq, struct work_struct *work)
Type:void
Parameter:
Type | Parameter | Name |
---|---|---|
int | cpu | |
struct workqueue_struct * | wq | |
struct work_struct * | work |
1404 | lockdep_assert_irqs_disabled() |
1406 | debug_work_activate(work) |
1413 | retry : |
1418 | If Not (hot fields used during command issue, aligned to cacheline & WQ_UNBOUND) Then pwq = per_cpu_ptr(I: per-cpu pwqs , cpu) |
1429 | If last_pool && last_pool != I: the associated pool Then |
1432 | spin_lock( & he pool lock ) |
1437 | pwq = L: current_work's pwq |
1438 | Else |
1440 | spin_unlock( & he pool lock ) |
1441 | spin_lock( & he pool lock ) |
1443 | Else |
1444 | spin_lock( & he pool lock ) |
1462 | WARN_ONCE(true, "workqueue: per-cpu pwq for %s on cpu%d has 0 refcnt", I: workqueue name , cpu) |
1469 | If WARN_ON(!list_empty - tests whether a list is empty*@head: the list to test.) Then Go to out |
1472 | nr_in_flight[L: current color ]++ |
1475 | If Value is more likely to compile time(L: nr of active works < L: max active works ) Then |
1477 | L: nr of active works ++ |
1478 | worklist = L: list of pending works |
1481 | Else |
1482 | work_flags |= WORK_STRUCT_DELAYED |
1483 | worklist = L: delayed works |
1488 | out : |
1489 | spin_unlock( & he pool lock ) |
Name | Describe |
---|---|
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 |
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 |