|
BmnRoot
|
Public Member Functions | |
| Semaphore (unsigned int resource_count=0) | |
| void | acquire () |
| Acquires a resource from the semaphore. | |
| void | release () |
| Releases a resource from the semaphore. | |
Definition at line 73 of file nica-scheduler.cpp.
|
inline |
Definition at line 76 of file nica-scheduler.cpp.
|
inline |
Acquires a resource from the semaphore.
Decrements the internal resource count. If the count is zero, the calling thread will block until another thread releases a resource by calling release().
Definition at line 87 of file nica-scheduler.cpp.
|
inline |
Releases a resource from the semaphore.
Increments the internal resource count. If a thread is waiting for a resource to be released, it will be notified.
Definition at line 100 of file nica-scheduler.cpp.