NOVA User-Level Environment
Version testbox/changed-memory-timing-317-g320d8b5
|
A user semaphore optimized for the case where we do not block. More...
#include <semaphore.h>
Public Member Functions | |
Semaphore (unsigned cap_sm=0, bool create=false) | |
void | down () |
void | up () |
unsigned | sm () |
Private Attributes | |
KernelSemaphore | _sem |
long | _value |
A user semaphore optimized for the case where we do not block.
This semaphore implementation breaks when threads blocking on the associated kernel semaphore can be canceled, because the kernel semaphore and the shared counter might then be out-of-sync.
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
private |