core: thread: add option to not wait on a semaphore at all
authorH. Peter Anvin <hpa@zytor.com>
Wed, 9 Sep 2009 19:23:21 +0000 (12:23 -0700)
committerEric W. Biederman <ebiederm@xmission.com>
Fri, 8 Apr 2011 21:42:05 +0000 (14:42 -0700)
commitb2dc73f9c1924d8827d7cbe18facb76d34601066
tree7423681b69fc763093cedc458e28cf4cbe5e3d78
parent0c44fcf078132b1f2915b7df9fcf4724f9d96b23
core: thread: add option to not wait on a semaphore at all

Implement a "trywait" option... if timeout is set to -1, then timeout
immediately if the semaphore isn't available.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
core/thread/semaphore.c