函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:start_flush_work

函数原型:static bool start_flush_work(struct work_struct *work, struct wq_barrier *barr, bool from_cancel)

返回类型:bool

参数:

类型参数名称
struct work_struct *work
struct wq_barrier *barr
boolfrom_cancel
2972  struct worker * worker = NULL
2976  might_sleep()
2978  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
2979  pool等于get_work_pool - return the worker_pool a given work was associated with*@work: the work item of interest* Pools are created and destroyed under wq_pool_mutex, and allows read* access under RCU read lock. As such, this function should be
2980  如果非pool
2981  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
2982  返回:false
2985  spin_lock_irq( & he pool lock )
2987  pwq等于get_work_pwq(work)
2988  如果pwq
2989  如果此条件成立可能性小(为编译器优化)(I: the associated pool != pool)则转到:already_gone
2991  否则
2992  worker等于d_worker_executing_work - find worker which is executing a work*@pool: pool of interest*@work: work to find worker for* Find a worker which is executing @work on @pool by searching*@pool->busy_hash which is keyed by the address of @work
2993  如果非worker则转到:already_gone
2995  pwq等于L: current_work's pwq
2998  heck_flush_dependency - check for flush dependency sanity*@target_wq: workqueue being flushed*@target_work: work item being flushed (NULL for workqueue flushes)* %current is trying to flush the whole @target_wq or @target_work on it
3000  sert_wq_barrier - insert a barrier work*@pwq: pwq to insert barrier into*@barr: wq_barrier to insert*@target: target work to attach @barr to*@worker: worker currently executing @target, NULL if @target is not executing*@barr is linked to @target such that
3001  spin_unlock_irq( & he pool lock )
3012  如果非from_cancelsaved_max_active恒等于1或rescuer的值则
3014  lock_map_acquire( & lockdep_map)
3015  lock_map_release( & lockdep_map)
3017  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
3018  返回:true
3019  already_gone :
3020  spin_unlock_irq( & he pool lock )
3021  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
3022  返回:false
调用者
名称描述
__flush_work