diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-06 12:23:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-06 12:23:07 -0400 |
commit | 3a3527b6461b1298cc53ce72f336346739297ac8 (patch) | |
tree | 30bea5dd7163f13d6c962888feaf53f50ead4cce /kernel/workqueue.c | |
parent | cc77b4db0017dab014ad7ea3d297e10f5b5bf028 (diff) | |
parent | a53f4b61a76a7e95139b8e8abba02e9bfe87a58a (diff) |
Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
Revert "net: Make accesses to ->br_port safe for sparse RCU"
mce: convert to rcu_dereference_index_check()
net: Make accesses to ->br_port safe for sparse RCU
vfs: add fs.h to define struct file
lockdep: Add an in_workqueue_context() lockdep-based test function
rcu: add __rcu API for later sparse checking
rcu: add an rcu_dereference_index_check()
tree/tiny rcu: Add debug RCU head objects
mm: remove all rcu head initializations
fs: remove all rcu head initializations, except on_stack initializations
powerpc: remove all rcu head initializations
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r-- | kernel/workqueue.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 327d2deb4451..59fef1531dd2 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -68,6 +68,21 @@ struct workqueue_struct { | |||
68 | #endif | 68 | #endif |
69 | }; | 69 | }; |
70 | 70 | ||
71 | #ifdef CONFIG_LOCKDEP | ||
72 | /** | ||
73 | * in_workqueue_context() - in context of specified workqueue? | ||
74 | * @wq: the workqueue of interest | ||
75 | * | ||
76 | * Checks lockdep state to see if the current task is executing from | ||
77 | * within a workqueue item. This function exists only if lockdep is | ||
78 | * enabled. | ||
79 | */ | ||
80 | int in_workqueue_context(struct workqueue_struct *wq) | ||
81 | { | ||
82 | return lock_is_held(&wq->lockdep_map); | ||
83 | } | ||
84 | #endif | ||
85 | |||
71 | #ifdef CONFIG_DEBUG_OBJECTS_WORK | 86 | #ifdef CONFIG_DEBUG_OBJECTS_WORK |
72 | 87 | ||
73 | static struct debug_obj_descr work_debug_descr; | 88 | static struct debug_obj_descr work_debug_descr; |