This takes or waits on a semaphore. If there are no semaphores then the method will wait as specified by the value of flag .
- Parameters:
-
| flag | Valid values are phSemaphoreWAIT and phSemaphoreNOWAIT. |
- Returns:
- A value denoting the success of the take operation.
- Return values:
-
| phSUCCESS | The semaphore was taken. |
| phSemaphoreTAKEN | The semaphore was taken. |
| phSemaphoreNOTAKE | The semaphore was not taken because flag was set as phSemaphoreNOWAIT and no semaphores were available. |
| phFAIL | The method failed and no semaphore was taken. |
Reimplemented from phSemaphore.
Definition at line 226 of file phLiveObject.cpp. |