Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 362829
b: refs/heads/master
c: cc189d2
h: refs/heads/master
i:
  362827: e3f6933
v: v3
  • Loading branch information
Waiman Long authored and Ingo Molnar committed Apr 19, 2013
1 parent d6c53d8 commit 6724cea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 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: 2bd2c92cf07cc4a373bf316c75b78ac465fefd35
refs/heads/master: cc189d2513d1f45cde87a9043fe3be28559c7490
10 changes: 0 additions & 10 deletions trunk/arch/x86/include/asm/mutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,3 @@
#else
# include <asm/mutex_64.h>
#endif

#ifndef __ASM_MUTEX_H
#define __ASM_MUTEX_H
/*
* For the x86 architecture, it allows any negative number (besides -1) in
* the mutex count to indicate that some other threads are waiting on the
* mutex.
*/
#define __ARCH_ALLOW_ANY_NEGATIVE_MUTEX_COUNT 1
#endif
9 changes: 2 additions & 7 deletions trunk/kernel/mutex.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,10 @@
#endif

/*
* A mutex count of -1 indicates that waiters are sleeping waiting for the
* mutex. Some architectures can allow any negative number, not just -1, for
* this purpose.
* A negative mutex count indicates that waiters are sleeping waiting for the
* mutex.
*/
#ifdef __ARCH_ALLOW_ANY_NEGATIVE_MUTEX_COUNT
#define MUTEX_SHOW_NO_WAITER(mutex) (atomic_read(&(mutex)->count) >= 0)
#else
#define MUTEX_SHOW_NO_WAITER(mutex) (atomic_read(&(mutex)->count) != -1)
#endif

void
__mutex_init(struct mutex *lock, const char *name, struct lock_class_key *key)
Expand Down

0 comments on commit 6724cea

Please sign in to comment.