|
libcmutils 0.6.5
Multi-platform C99 utility library
|
Platform independent semaphore object. More...
Data Fields | |
| CMBool(* | Acquire )(CMUTIL_Semaphore *semaphore, long millisec) |
| Acquire ownership from semaphore. | |
| void(* | Release )(CMUTIL_Semaphore *semaphore) |
| Release ownership to semaphore. | |
| void(* | Destroy )(CMUTIL_Semaphore *semaphore) |
| Destroy all resources related to this object. | |
Platform independent semaphore object.
| CMBool(* CMUTIL_Semaphore::Acquire) (CMUTIL_Semaphore *semaphore, long millisec) |
Acquire ownership from semaphore.
Acquire ownership in the given time or fail with timed out. This method will be blocked until ownership is acquired successfully in time, or the waiting time expired.
| semaphore | This semaphore object. |
| millisec | Waiting time to acquire ownership, in millisecond. |
| void(* CMUTIL_Semaphore::Release) (CMUTIL_Semaphore *semaphore) |
Release ownership to semaphore.
Release ownership to semaphore, the semaphore value increased greater than zero consequently, one of the threads which is blocked in the Acquire method will get the ownership and be unblocked.
| semaphore | This semaphore object. |
| void(* CMUTIL_Semaphore::Destroy) (CMUTIL_Semaphore *semaphore) |
Destroy all resources related to this object.
| semaphore | This semaphore object. |