DRAFT

SDL_CondWait

Use this function to wait on the condition variable, unlocking the provided mutex. Alternate: ...unlock the provided mutex and wait on the condition variable.

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?

Syntax

int SDL_CondWait(SDL_cond*  cond,
                 SDL_mutex* mutex)

Function Parameters

cond

the applicable condition variable ???

mutex

the mutex to unlock

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.*

Alternate version: The mutex must be locked before entering this function! 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.


CategoryAPI, CategoryMutex

SDL_CondWait (last edited 2010-10-18 01:17:26 by SheenaSmith)

Feedback
Please include your contact information if you'd like to receive a reply.
Submit