NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
void Acquire ( mutex  m)
inline

Acquire a mutex.

Acquire the specified mutex variable. If another task already has acquired the mutex then the current task will be suspended until the mutex is released by the other task. This function is used to ensure that the current task has exclusive access to a shared resource, such as the display or a motor. After the current task has finished using the shared resource the program should call Release to allow other tasks to acquire the mutex.

Parameters
mThe mutex to acquire.
Examples:
ex_Acquire.nxc, and ex_Release.nxc.