mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-26 14:17:26 -04:00
workqueue: implement WQ_NON_REENTRANT
With gcwq managing all the workers and work->data pointing to the last gcwq it was on, non-reentrance can be easily implemented by checking whether the work is still running on the previous gcwq on queueing. Implement it. Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
7a22ad757e
commit
18aa9effad
2 changed files with 30 additions and 3 deletions
|
@ -225,6 +225,7 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; }
|
|||
enum {
|
||||
WQ_FREEZEABLE = 1 << 0, /* freeze during suspend */
|
||||
WQ_SINGLE_CPU = 1 << 1, /* only single cpu at a time */
|
||||
WQ_NON_REENTRANT = 1 << 2, /* guarantee non-reentrance */
|
||||
};
|
||||
|
||||
extern struct workqueue_struct *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue