Wiki Page Content

Revision 4 as of 2010-10-12 05:58:18

Clear message

DRAFT

SDL_CondWaitTimeout

Use this function to wait on a condition variable for a fixed delay -or- *with timeout*.

green

Syntax

int SDL_CondWaitTimeout(SDL_cond*  cond,
                        SDL_mutex* mutex,
                        Uint32     ms)

Function Parameters

cond

the applicable SDL_cond ???

mutex

a pointer to the SDL_mutex to be timed out ???

ms

the maximum number of milliseconds to wait

Return Value

Returns 0 if the condition variable is signaled, SDL_MUTEX_TIMEDOUT if the condition is not signaled in the allotted time, or a negative error code on failure; call SDL_GetError() for more information.

Code Examples

You can add your code example here

Remarks

*
mutex is unlocked so it must be locked when the function is called and it will re- unlock afterward.

green


*

On some platforms this function is implemented by looping with a delay of 1 ms, and so should be avoided if possible.


CategoryAPI, CategoryMutex

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