|
Size: 993
Comment: update content - changeset 4469
|
Size: 1820
Comment: update content (old wiki)
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 6: | Line 6: |
| Use this function to wait on the condition variable, unlocking the provided mutex. | Use this function to wait on the condition variable, unlocking the provided mutex. <<Color2(green, Alternate: ...unlock the provided mutex and wait on the condition variable.)>> <<Color2(green,I expect that this works on the current thread or the one that it is called from within. Is that correct? Is there any need to specify any of this here?)>> |
| Line 17: | Line 19: |
| ||'''cond'''||^a pointer to the SDL_cond structure that is being applied^ ???|| ||'''mutex'''||^a pointer to the SDL_mutex structure that is to be unlocked^|| |
||'''cond'''||^a pointer to the condition variable that is being applied^ ???|| ||'''mutex'''||^a pointer to the mutex that is to be unlocked^|| |
| Line 21: | Line 23: |
| Returns 0 when it is signaled, or -1 on error; call [[SDL_GetError]]() for more information. | Returns 0 when it is signaled or a negative error code on failure; call [[SDL_GetError]]() for more information. |
| Line 29: | Line 31: |
| /!\ {i} The mutex must be locked before entering this function! The mutex is re-locked once the condition variable is signaled. | The mutex must be locked before entering this function! The mutex is re-locked once the condition variable is signaled *^by^ another thread call^ing^ [[SDL_CondSignal]]() or [[SDL_CondBroadcast]]() on the condition variable '''cond'''.* <<Color2(green,Alternate version:)>> The mutex must be locked before entering this function! <<Color2(green,This line may be moved to the end instead.)>> 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. |
| Line 32: | Line 39: |
| .[[SDL_CondWaitTimeout]] ??? | .[[SDL_CondSignal]] * .[[SDL_CondWaitTimeout]] * .[[SDL_mutexP]] * |
DRAFT |
SDL_CondWait
Use this function to wait on the condition variable, unlocking the provided mutex. green
green
Contents
Syntax
int SDL_CondWait(SDL_cond* cond,
SDL_mutex* mutex)
Function Parameters
cond |
a pointer to the condition variable that is being applied ??? |
mutex |
a pointer to the mutex that is to be unlocked |
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
The mutex must be locked before entering this function! The mutex is re-locked once the condition variable is signaled *by another thread calling SDL_CondSignal() or SDL_CondBroadcast() on the condition variable cond.*
green
The mutex must be locked before entering this function! green
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.
