![]() |
VEXcode IQ C++ Unofficial documentation for version 3.0.4.1
|
Use this class to synchronize access to resources. More...
#include <vex_task.h>
Public Member Functions | |
void | lock () |
Attempts to lock the semaphore. If the semaphore is previously locked, it will block until the semaphore is unlocked. | |
void | lock (uint32_t time) |
Attempts to lock the semaphore. If the semaphore is previously locked, it will block until the timeout has expired or the semaphore is unlocked. | |
void | unlock () |
Unlocks a locked semaphore. | |
bool | owner () |
Checks to see if the semaphore was locked and is owned by the current task. | |
Use this class to synchronize access to resources.
Definition at line 153 of file vex_task.h.
void vex::semaphore::lock | ( | uint32_t | time | ) |
Attempts to lock the semaphore. If the semaphore is previously locked, it will block until the timeout has expired or the semaphore is unlocked.
time | The maximum amount of time to wait for the semaphore to be unlocked in milliseconds. |
bool vex::semaphore::owner | ( | ) |
Checks to see if the semaphore was locked and is owned by the current task.