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:
@ -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 *
|
||||
|
Reference in New Issue
Block a user