diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-04-02 11:17:41 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-04-02 11:17:41 +0900 |
commit | c4361bb64b81f5b81a7a08d58654493385a2f2b2 (patch) | |
tree | 8741c0b60ddfbc3fc4e17c8d200f6aa6ff32cca0 /kernel/mutex.h | |
parent | 46368fa05164e1afdc1401294908cf30c6d8d981 (diff) | |
parent | 833bb3046b6cb320e775ea2160ddca87d53260d5 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'kernel/mutex.h')
-rw-r--r-- | kernel/mutex.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/kernel/mutex.h b/kernel/mutex.h index a075dafbb29..67578ca48f9 100644 --- a/kernel/mutex.h +++ b/kernel/mutex.h @@ -16,8 +16,26 @@ #define mutex_remove_waiter(lock, waiter, ti) \ __list_del((waiter)->list.prev, (waiter)->list.next) -#define debug_mutex_set_owner(lock, new_owner) do { } while (0) -#define debug_mutex_clear_owner(lock) do { } while (0) +#ifdef CONFIG_SMP +static inline void mutex_set_owner(struct mutex *lock) +{ + lock->owner = current_thread_info(); +} + +static inline void mutex_clear_owner(struct mutex *lock) +{ + lock->owner = NULL; +} +#else +static inline void mutex_set_owner(struct mutex *lock) +{ +} + +static inline void mutex_clear_owner(struct mutex *lock) +{ +} +#endif + #define debug_mutex_wake_waiter(lock, waiter) do { } while (0) #define debug_mutex_free_waiter(waiter) do { } while (0) #define debug_mutex_add_waiter(lock, waiter, ti) do { } while (0) |