Wiki Page Content

Differences between revisions 8 and 9
Revision 8 as of 2011-02-25 21:22:02
Size: 1515
Editor: Paul Walters
Comment: Updated descriptions of function parameters
Revision 9 as of 2011-03-18 22:22:50
Size: 1517
Editor: SheenaSmith
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.

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.


CategoryAPI, CategoryMutex

None: SDL_CondWait (last edited 2015-04-26 19:04:51 by PhilippWiesemann)

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