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_CreateCond</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_CreateCond
\r
14 <h1>SDL_CreateCond</h1>
\r
15 \90V
\82µ
\82¢
\8fð
\8c\8f\95Ï
\90\94\82ð
\90¶
\90¬
\82·
\82é
\r
17 <code>SDL_cond* SDL_CreateCond(void)</code>
\r
18 <h2>
\96ß
\82è
\92l</h2>
\r
19 \90V
\82µ
\82¢
\8fð
\8c\8f\95Ï
\90\94\82ð
\96ß
\82·.
\8e¸
\94s
\82Ì
\82Æ
\82«NULL
\82ð
\96ß
\82·.
\r
20 <a href="SDL_GetError.html">SDL_GetError()</a>
\82Å
\8fÚ
\8d×
\82ð
\92m
\82é
\82±
\82Æ
\82ª
\82Å
\82«
\82é.
\r
21 <h2>
\83T
\83\93\83v
\83\8b\83R
\81[
\83h</h2>
\r
23 \8fð
\8c\8f\95Ï
\90\94\82Ì
\93T
\8c^
\93I
\82È
\8eg
\82¢
\95û:
\r
26 SDL_bool condition = SDL_FALSE;
\r
30 lock = SDL_CreateMutex();
\r
31 cond = SDL_CreateCond();
\r
35 SDL_LockMutex(lock);
\r
36 while (!condition) {
\r
37 SDL_CondWait(cond, lock);
\r
39 SDL_UnlockMutex(lock);
\r
42 SDL_LockMutex(lock);
\r
44 condition = SDL_TRUE;
\r
46 SDL_CondSignal(cond);
\r
47 SDL_UnlockMutex(lock);
\r
50 SDL_DestroyCond(cond);
\r
51 SDL_DestroyMutex(lock);
\r
55 <h2>
\83o
\81[
\83W
\83\87\83\93</h2>
\r
57 <h2>
\8aÖ
\98A
\8d\80\96Ú(
\8aÖ
\90\94)</h2>
\r
58 <a href="SDL_CondBroadcast.html">SDL_CondBroadcast</a><br>
\r
59 <a href="SDL_CondSignal.html">SDL_CondSignal</a><br>
\r
60 <a href="SDL_CondWait.html">SDL_CondWait</a><br>
\r
61 <a href="SDL_CondWaitTimeout.html">SDL_CondWaitTimeout</a><br>
\r
62 <a href="SDL_DestroyCond.html">SDL_DestroyCond</a><br>
\r
63 <h2>SDL Wiki
\82Ö
\82Ì
\83\8a\83\93\83N</h2>
\r
64 <a href="https://wiki.libsdl.org/SDL_CreateCond">SDL_CreateCond - SDL Wiki</a>
\r