Simplify semaphore implementation

By removing the negative values of 'count' and relying on the wait_list to
indicate whether we have any waiters, we can simplify the implementation
by removing the protection against an unlikely race condition.  Thanks to
David Howells for his suggestions.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
This commit is contained in:
Matthew Wilcox 2008-03-14 14:35:22 -04:00 • committed by Matthew Wilcox
commit b17170b2fa
2 changed files with 27 additions and 60 deletions