diff options
author | Namhyung Kim <namhyung@gmail.com> | 2010-08-22 23:19:42 +0900 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2010-08-23 11:37:49 +0200 |
commit | 06bd6ebffae36d3b105677598c48e8bd0a10b205 (patch) | |
tree | d75a38a50378a3365bf57383297e0fe0372e916a | |
parent | 8d9df9f0844ed87541453a3ef91bfc9f487053b7 (diff) | |
download | linux-06bd6ebffae36d3b105677598c48e8bd0a10b205.tar.gz linux-06bd6ebffae36d3b105677598c48e8bd0a10b205.tar.bz2 linux-06bd6ebffae36d3b105677598c48e8bd0a10b205.zip |
workqueue: annotate lock context change
Some of internal functions called within gcwq->lock context releases and
regrabs the lock but were missing proper annotations. Add it.
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
-rw-r--r-- | kernel/workqueue.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 1001b6e3fcbd..7415f27a8aa7 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -1485,6 +1485,8 @@ static void gcwq_mayday_timeout(unsigned long __gcwq) * otherwise. */ static bool maybe_create_worker(struct global_cwq *gcwq) +__releases(&gcwq->lock) +__acquires(&gcwq->lock) { if (!need_to_create_worker(gcwq)) return false; @@ -1722,6 +1724,8 @@ static void cwq_dec_nr_in_flight(struct cpu_workqueue_struct *cwq, int color) * spin_lock_irq(gcwq->lock) which is released and regrabbed. */ static void process_one_work(struct worker *worker, struct work_struct *work) +__releases(&gcwq->lock) +__acquires(&gcwq->lock) { struct cpu_workqueue_struct *cwq = get_work_cwq(work); struct global_cwq *gcwq = cwq->gcwq; @@ -3230,6 +3234,8 @@ static int __cpuinit trustee_thread(void *__gcwq) * multiple times. To be used by cpu_callback. */ static void __cpuinit wait_trustee_state(struct global_cwq *gcwq, int state) +__releases(&gcwq->lock) +__acquires(&gcwq->lock) { if (!(gcwq->trustee_state == state || gcwq->trustee_state == TRUSTEE_DONE)) { |