Penguin
Blame: SDL_CreateSemaphore(3)
EditPageHistoryDiffInfoLikePages
Annotated edit history of SDL_CreateSemaphore(3) version 2 showing authors affecting page license. View with all changes included.
Rev Author # Line
1 perry 1 SDL_!CreateSemaphore
2 !!!SDL_!CreateSemaphore
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 RETURN VALUE
7 EXAMPLES
8 SEE ALSO
9 ----
10 !!NAME
11
12
13 SDL_!CreateSemaphore- Creates a new semaphore and assigns an initial value to it.
14 !!SYNOPSIS
15
16
17 __#include
18 __
19
20
21 __SDL_sem *SDL_!CreateSemaphore__(__Uint32
22 initial_value__);
23 !!DESCRIPTION
24
25
26 __SDL_!CreateSemaphore()__ creates a new semaphore and
27 initializes it with the value __initial_value__. Each
28 locking operation on the semaphore by ''SDL_!SemWait'',
29 ''SDL_!SemTryWait'' or ''SDL_!SemWaitTimeout'' will
30 atomically decrement the semaphore value. The locking
31 operation will be blocked if the semaphore value is not
32 positive (greater than zero). Each unlock operation by
33 ''SDL_!SemPost'' will atomically increment the semaphore
34 value.
35 !!RETURN VALUE
36
37
38 Returns a pointer to an initialized semaphore or __NULL__
39 if there was an error.
40 !!EXAMPLES
41
42
43 SDL_sem *my_sem;
44 my_sem = SDL_!CreateSemaphore(INITIAL_SEM_VALUE);
45 if (my_sem == NULL) {
46 return CREATE_SEM_FAILED;
47 }
48 !!SEE ALSO
49
50
51 __SDL_!DestroySemaphore__, __SDL_!SemWait__,
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.