函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__queue_delayed_work

函数原型:static void __queue_delayed_work(int cpu, struct workqueue_struct *wq, struct delayed_work *dwork, unsigned long delay)

返回类型:void

参数:

类型参数名称
intcpu
struct workqueue_struct *wq
struct delayed_work *dwork
unsigned longdelay
1618  timer等于timer
1619  work等于work
1621  WARN_ON_ONCE(!wq)
1622  WARN_ON_ONCE(function != delayed_work_timer_fn)
1623  WARN_ON_ONCE(mer_pending - is a timer pending?*@timer: the timer in question* timer_pending will tell whether a given timer is currently pending,* or not. Callers must ensure serialization wrt. other operations done* to this timer, eg)
1624  WARN_ON_ONCE(!链表为空)
1632  如果非delay
1633  __queue_work(cpu, wq, & work)
1634  返回
1637  target workqueue and CPU ->timer uses to queue ->work 等于wq
1638  cpu等于cpu
1639  expires等于jiffiesdelay
1641  如果此条件成立可能性小(为编译器优化)(cpu != WORK_CPU_UNBOUND)则add_timer_on(timer, cpu)
1643  否则add_timer(timer)
调用者
名称描述
queue_delayed_work_onqueue_delayed_work_on - queue work on specific CPU after delay*@cpu: CPU number to execute work on*@wq: workqueue to use*@dwork: work to queue*@delay: number of jiffies to wait before queueing
mod_delayed_work_onmod_delayed_work_on - modify delay of or queue a delayed work on specific CPU*@cpu: CPU number to execute work on*@wq: workqueue to use*@dwork: work to queue*@delay: number of jiffies to wait before queueing* If @dwork is idle, equivalent to