diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-30 20:17:35 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-30 20:17:35 -0400 |
| commit | c4e1aa67ed9e4e542a064bc271ddbf152b677e91 (patch) | |
| tree | 2a2ca00bed0fc22b4eb83db092c9178868d8f76b /kernel/mutex-debug.h | |
| parent | cf2f7d7c90279cdbc12429de278f3d27ac2050ae (diff) | |
| parent | 2f8501815256af8498904e68bd0984b1afffd6f8 (diff) | |
Merge branch 'locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (33 commits)
lockdep: fix deadlock in lockdep_trace_alloc
lockdep: annotate reclaim context (__GFP_NOFS), fix SLOB
lockdep: annotate reclaim context (__GFP_NOFS), fix
lockdep: build fix for !PROVE_LOCKING
lockstat: warn about disabled lock debugging
lockdep: use stringify.h
lockdep: simplify check_prev_add_irq()
lockdep: get_user_chars() redo
lockdep: simplify get_user_chars()
lockdep: add comments to mark_lock_irq()
lockdep: remove macro usage from mark_held_locks()
lockdep: fully reduce mark_lock_irq()
lockdep: merge the !_READ mark_lock_irq() helpers
lockdep: merge the _READ mark_lock_irq() helpers
lockdep: simplify mark_lock_irq() helpers #3
lockdep: further simplify mark_lock_irq() helpers
lockdep: simplify the mark_lock_irq() helpers
lockdep: split up mark_lock_irq()
lockdep: generate usage strings
lockdep: generate the state bit definitions
...
Diffstat (limited to 'kernel/mutex-debug.h')
| -rw-r--r-- | kernel/mutex-debug.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/kernel/mutex-debug.h b/kernel/mutex-debug.h index babfbdfc534b..6b2d735846a5 100644 --- a/kernel/mutex-debug.h +++ b/kernel/mutex-debug.h | |||
| @@ -13,14 +13,6 @@ | |||
| 13 | /* | 13 | /* |
| 14 | * This must be called with lock->wait_lock held. | 14 | * This must be called with lock->wait_lock held. |
| 15 | */ | 15 | */ |
| 16 | extern void | ||
| 17 | debug_mutex_set_owner(struct mutex *lock, struct thread_info *new_owner); | ||
| 18 | |||
| 19 | static inline void debug_mutex_clear_owner(struct mutex *lock) | ||
| 20 | { | ||
| 21 | lock->owner = NULL; | ||
| 22 | } | ||
| 23 | |||
| 24 | extern void debug_mutex_lock_common(struct mutex *lock, | 16 | extern void debug_mutex_lock_common(struct mutex *lock, |
| 25 | struct mutex_waiter *waiter); | 17 | struct mutex_waiter *waiter); |
| 26 | extern void debug_mutex_wake_waiter(struct mutex *lock, | 18 | extern void debug_mutex_wake_waiter(struct mutex *lock, |
| @@ -35,6 +27,16 @@ extern void debug_mutex_unlock(struct mutex *lock); | |||
| 35 | extern void debug_mutex_init(struct mutex *lock, const char *name, | 27 | extern void debug_mutex_init(struct mutex *lock, const char *name, |
| 36 | struct lock_class_key *key); | 28 | struct lock_class_key *key); |
| 37 | 29 | ||
| 30 | static inline void mutex_set_owner(struct mutex *lock) | ||
| 31 | { | ||
| 32 | lock->owner = current_thread_info(); | ||
| 33 | } | ||
| 34 | |||
| 35 | static inline void mutex_clear_owner(struct mutex *lock) | ||
| 36 | { | ||
| 37 | lock->owner = NULL; | ||
| 38 | } | ||
| 39 | |||
| 38 | #define spin_lock_mutex(lock, flags) \ | 40 | #define spin_lock_mutex(lock, flags) \ |
| 39 | do { \ | 41 | do { \ |
| 40 | struct mutex *l = container_of(lock, struct mutex, wait_lock); \ | 42 | struct mutex *l = container_of(lock, struct mutex, wait_lock); \ |
