diff options
Diffstat (limited to 'kernel/mutex.c')
-rw-r--r-- | kernel/mutex.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/kernel/mutex.c b/kernel/mutex.c index 1dbd4210baef..ad53a664f113 100644 --- a/kernel/mutex.c +++ b/kernel/mutex.c | |||
@@ -38,15 +38,10 @@ | |||
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | /* | 40 | /* |
41 | * A mutex count of -1 indicates that waiters are sleeping waiting for the | 41 | * A negative mutex count indicates that waiters are sleeping waiting for the |
42 | * mutex. Some architectures can allow any negative number, not just -1, for | 42 | * mutex. |
43 | * this purpose. | ||
44 | */ | 43 | */ |
45 | #ifdef __ARCH_ALLOW_ANY_NEGATIVE_MUTEX_COUNT | ||
46 | #define MUTEX_SHOW_NO_WAITER(mutex) (atomic_read(&(mutex)->count) >= 0) | 44 | #define MUTEX_SHOW_NO_WAITER(mutex) (atomic_read(&(mutex)->count) >= 0) |
47 | #else | ||
48 | #define MUTEX_SHOW_NO_WAITER(mutex) (atomic_read(&(mutex)->count) != -1) | ||
49 | #endif | ||
50 | 45 | ||
51 | void | 46 | void |
52 | __mutex_init(struct mutex *lock, const char *name, struct lock_class_key *key) | 47 | __mutex_init(struct mutex *lock, const char *name, struct lock_class_key *key) |