Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
SDL_SemWait(3)
Edit
PageHistory
Diff
Info
LikePages
SDL_!SemWait !!!SDL_!SemWait NAME SYNOPSIS DESCRIPTION RETURN VALUE EXAMPLES SEE ALSO ---- !!NAME SDL_!SemWait- Lock a semaphore and suspend the thread if the semaphore value is zero. !!SYNOPSIS __#include __ __int SDL_!SemWait__(__SDL_sem *sem__); !!DESCRIPTION __SDL_!SemWait()__ suspends the calling thread until either the semaphore pointed to by __sem__ has a positive value, the call is interrupted by a signal or error. If the call is successful it will atomically decrement the semaphore value. After __SDL_!SemWait()__ is successful, the semaphore can be released and its count atomically incremented by a successful call to ''SDL_!SemPost''. !!RETURN VALUE Returns __0__ if successful or __-1__ if there was an error (leaving the semaphore unchanged). !!EXAMPLES if (SDL_!SemWait(my_sem) == -1) { return WAIT_FAILED; } ... SDL_!SemPost(my_sem); !!SEE ALSO __SDL_!CreateSemaphore__, __SDL_!DestroySemaphore__, __SDL_!SemTryWait__, __SDL_!SemWaitTimeout__, __SDL_!SemPost__, __SDL_!SemValue__ ----
One page links to
SDL_SemWait(3)
:
SDLManPages
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.