1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
\r
4 <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
\r
5 <meta http-equiv="Content-Style-Type" content="text/css">
\r
6 <meta name="keywords" content="Simple Directmedia Layer SDL2.0">
\r
7 <link rel="top" href="index.html" title="
\83z
\81[
\83\80">
\r
8 <link rel="parent" href="CategoryMutex.html" title="1
\82Â
\8fã">
\r
9 <title>SDL_SemPost</title>
\r
12 <a href="index.html">
\96Ú
\8e\9f</a> - <a href="ApiByCategory.html">API(
\8b@
\94\
\95Ê)</a> - <a href="CategoryMutex.html">
\93¯
\8aú
\83v
\83\8a\83~
\83e
\83B
\83u</a> - SDL_SemPost
\r
14 <h1>SDL_SemPost</h1>
\r
15 \83Z
\83}
\83t
\83H
\82Ì
\92l
\82ð1
\89Á
\8eZ
\82µ,
\91Ò
\8b@
\92\86\82Ì
\83X
\83\8c\83b
\83h
\82ð
\8dÄ
\8aJ
\82·
\82é
\r
17 <code>int SDL_SemPost(SDL_sem* sem)</code>
\r
19 <table border="1" summary="SDL_SemPost">
\r
20 <tr><td>sem</td><td>
\89Á
\8eZ
\82·
\82é
\83Z
\83}
\83t
\83H</td></tr>
\r
22 <h2>
\96ß
\82è
\92l</h2>
\r
23 \90¬
\8c÷
\82Ì
\82Æ
\82«0,
\8e¸
\94s
\82Ì
\82Æ
\82«
\95\89\82Ì
\90\94\82Ì
\83G
\83\89\81[
\83R
\81[
\83h
\82ð
\96ß
\82·.
\r
24 <a href="SDL_GetError.html">SDL_GetError()</a>
\82Å
\8fÚ
\8d×
\82ð
\92m
\82é
\82±
\82Æ
\82ª
\82Å
\82«
\82é.
\r
25 <h2>
\83T
\83\93\83v
\83\8b\83R
\81[
\83h</h2>
\r
32 SDL_AtomicSet(&done, 0);
\r
33 sem = SDL_CreateSemaphore(0);
\r
37 while (!SDL_AtomicGet(&done)) {
\r
38 add_data_to_queue();
\r
43 while (!SDL_AtomicGet(&done)) {
\r
45 if (data_available()) {
\r
46 get_data_from_queue();
\r
51 SDL_AtomicSet(&done, 1);
\r
54 SDL_DestroySemaphore(sem);
\r
58 <h2>
\83o
\81[
\83W
\83\87\83\93</h2>
\r
60 <h2>
\8aÖ
\98A
\8d\80\96Ú(
\8aÖ
\90\94)</h2>
\r
61 <a href="SDL_CreateSemaphore.html">SDL_CreateSemaphore</a><br>
\r
62 <a href="SDL_DestroySemaphore.html">SDL_DestroySemaphore</a><br>
\r
63 <a href="SDL_SemTryWait.html">SDL_SemTryWait</a><br>
\r
64 <a href="SDL_SemValue.html">SDL_SemValue</a><br>
\r
65 <a href="SDL_SemWait.html">SDL_SemWait</a><br>
\r
66 <a href="SDL_SemWaitTimeout.html">SDL_SemWaitTimeout</a><br>
\r
67 <h2>SDL Wiki
\82Ö
\82Ì
\83\8a\83\93\83N</h2>
\r
68 <a href="https://wiki.libsdl.org/SDL_SemPost">SDL_SemPost - SDL Wiki</a>
\r