|
Size: 1515
Comment: Updated descriptions of function parameters
|
Size: 1517
Comment: camelcase pragma change, fix category link
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 2: | Line 2: |
| #pragma disable-camelcase | #pragma camelcase off |
| Line 28: | Line 28: |
| Line 41: | Line 42: |
| [[CategoryAPI]], CategoryMutex | [[CategoryAPI]], [[CategoryMutex]] |
DRAFT |
SDL_CondWait
Use this function to coordinate threads in a multi-threaded environment. This function will unlock the provided mutex and wait for the condition variable to be signaled. Once the condition variable is signaled this function will re-lock the mutex and return.
Contents
Syntax
int SDL_CondWait(SDL_cond* cond,
SDL_mutex* mutex)
Function Parameters
cond |
The condition pointer whose signal will be waited on. |
mutex |
Mutex pointer used to gate thread access. |
Return Value
Returns 0 when it is signaled or a negative error code on failure; call SDL_GetError() for more information.
Code Examples
You can add your code example here
Remarks
This function unlocks the specified mutex and waits on another thread to call SDL_CondSignal() or SDL_CondBroadcast() on the condition variable cond. The mutex is re-locked once the condition variable is signaled.
The mutex must be locked before entering this function.
This function is the equivalent of calling SDL_CondWaitTimeout with a time length of SDL_MUTEX_MAXWAIT.
