Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75521
b: refs/heads/master
c: eb13ba8
h: refs/heads/master
i:
  75519: b8e1b9d
v: v3
  • Loading branch information
Johannes Berg authored and Peter Zijlstra committed Jan 16, 2008
1 parent f9602ec commit 9a89c4f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5a26db5bd25cf4bf32ae9fa9f6136b6b6d5b45c5
refs/heads/master: eb13ba873881abd5e15af784756a61af635e665e
14 changes: 11 additions & 3 deletions trunk/include/linux/workqueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,19 +149,27 @@ struct execute_work {

extern struct workqueue_struct *
__create_workqueue_key(const char *name, int singlethread,
int freezeable, struct lock_class_key *key);
int freezeable, struct lock_class_key *key,
const char *lock_name);

#ifdef CONFIG_LOCKDEP
#define __create_workqueue(name, singlethread, freezeable) \
({ \
static struct lock_class_key __key; \
const char *__lock_name; \
\
if (__builtin_constant_p(name)) \
__lock_name = (name); \
else \
__lock_name = #name; \
\
__create_workqueue_key((name), (singlethread), \
(freezeable), &__key); \
(freezeable), &__key, \
__lock_name); \
})
#else
#define __create_workqueue(name, singlethread, freezeable) \
__create_workqueue_key((name), (singlethread), (freezeable), NULL)
__create_workqueue_key((name), (singlethread), (freezeable), NULL, NULL)
#endif

#define create_workqueue(name) __create_workqueue((name), 0, 0)
Expand Down
5 changes: 3 additions & 2 deletions trunk/kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,8 @@ static void start_workqueue_thread(struct cpu_workqueue_struct *cwq, int cpu)
struct workqueue_struct *__create_workqueue_key(const char *name,
int singlethread,
int freezeable,
struct lock_class_key *key)
struct lock_class_key *key,
const char *lock_name)
{
struct workqueue_struct *wq;
struct cpu_workqueue_struct *cwq;
Expand All @@ -739,7 +740,7 @@ struct workqueue_struct *__create_workqueue_key(const char *name,
}

wq->name = name;
lockdep_init_map(&wq->lockdep_map, name, key, 0);
lockdep_init_map(&wq->lockdep_map, lock_name, key, 0);
wq->singlethread = singlethread;
wq->freezeable = freezeable;
INIT_LIST_HEAD(&wq->list);
Expand Down

0 comments on commit 9a89c4f

Please sign in to comment.