Penguin
Blame: SDL_SemWait(3)
EditPageHistoryDiffInfoLikePages
Annotated edit history of SDL_SemWait(3) version 2 showing authors affecting page license. View with all changes included.
Rev Author # Line
1 perry 1 SDL_!SemWait
2 !!!SDL_!SemWait
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 RETURN VALUE
7 EXAMPLES
8 SEE ALSO
9 ----
10 !!NAME
11
12
13 SDL_!SemWait- Lock a semaphore and suspend the thread if the semaphore value is zero.
14 !!SYNOPSIS
15
16
17 __#include
18 __
19
20
21 __int SDL_!SemWait__(__SDL_sem *sem__);
22 !!DESCRIPTION
23
24
25 __SDL_!SemWait()__ suspends the calling thread until
26 either the semaphore pointed to by __sem__ has a positive
27 value, the call is interrupted by a signal or error. If the
28 call is successful it will atomically decrement the
29 semaphore value.
30
31
32 After __SDL_!SemWait()__ is successful, the semaphore can
33 be released and its count atomically incremented by a
34 successful call to ''SDL_!SemPost''.
35 !!RETURN VALUE
36
37
38 Returns __0__ if successful or __-1__ if there was an
39 error (leaving the semaphore unchanged).
40 !!EXAMPLES
41
42
43 if (SDL_!SemWait(my_sem) == -1) {
44 return WAIT_FAILED;
45 }
46 ...
47 SDL_!SemPost(my_sem);
48 !!SEE ALSO
49
50
51 __SDL_!CreateSemaphore__, __SDL_!DestroySemaphore__,
52 __SDL_!SemTryWait__, __SDL_!SemWaitTimeout__,
53 __SDL_!SemPost__, __SDL_!SemValue__
54 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.