lkml.org 
[lkml]   [2013]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH V2 12/15] workqueue: add extra flags to set_work_worker_and_keep_pending()
Date
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
kernel/workqueue.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index cdd5523..ab5c61a 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -544,9 +544,11 @@ static inline unsigned long worker_id_to_data(int worker_id)
}

static void set_work_worker_and_keep_pending(struct work_struct *work,
- int worker_id)
+ int worker_id,
+ unsigned long extra_flags)
{
- set_work_data(work, worker_id_to_data(worker_id), WORK_STRUCT_PENDING);
+ set_work_data(work, worker_id_to_data(worker_id),
+ extra_flags | WORK_STRUCT_PENDING);
}

static void set_work_worker_and_clear_pending(struct work_struct *work,
@@ -1157,7 +1159,7 @@ static int try_to_grab_pending(struct work_struct *work, bool is_dwork,
else
worker_id = WORK_OFFQ_WORKER_NONE;

- set_work_worker_and_keep_pending(work, worker_id);
+ set_work_worker_and_keep_pending(work, worker_id, 0);

spin_unlock(&pool->lock);
return 1;
--
1.7.7.6


\
 
 \ /
  Last update: 2013-02-18 18:21    [W:0.127 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site