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_CreateMutex</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_CreateMutex
\r
14 <h1>SDL_CreateMutex</h1>
\r
15 \90V
\82µ
\82¢mutex
\82ð
\90¶
\90¬
\82·
\82é
\r
17 <code>SDL_mutex* SDL_CreateMutex(void)</code>
\r
18 <h2>
\96ß
\82è
\92l</h2>
\r
19 \8f\89\8aú
\89»
\82³
\82ê
\83A
\83\93\83\8d\83b
\83N
\82³
\82ê
\82½mutex
\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
27 mutex = SDL_CreateMutex();
\r
29 fprintf(stderr, "mutex
\82ð
\90¶
\90¬
\82Å
\82«
\82È
\82©
\82Á
\82½\n");
\r
33 if (SDL_LockMutex(mutex) == 0) {
\r
34 /*
\82±
\82±
\82Åmutex
\82ª
\83\8d\83b
\83N
\82³
\82ê
\82Ä
\82¢
\82é
\8aÔ
\82Ì
\8f\88\97\9d\82ð
\82·
\82é */
\r
35 SDL_UnlockMutex(mutex);
\r
37 fprintf(stderr, "mutex
\82ð
\83\8d\83b
\83N
\82Å
\82«
\82È
\82©
\82Á
\82½\n");
\r
40 SDL_DestroyMutex(mutex);
\r
46 \91¼
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\8aù
\82É
\83\8d\83b
\83N
\82³
\82ê
\82Ä
\82¢
\82é
\8aÔ
\82Í<a href="SDL_LockMutex.html">SDL_LockMutex()</a>
\82©
\82ç
\96ß
\82ç
\82È
\82¢.
\r
47 \83u
\83\8d\83b
\83N
\82¹
\82¸
\82É
\83\8d\83b
\83N
\82ð
\8e\8e\82Ý
\82½
\82¢
\8fê
\8d\87\82Í<a href="SDL_TryLockMutex.html">SDL_TryLockMutex()</a>
\82ð
\8eg
\82¤
\82±
\82Æ.
\r
50 SDL
\82Ìmutex
\82Í
\83\8a\83G
\83\93\83g
\83\89\83\93\83g(
\8dÄ
\93ü
\89Â
\94\)
\82Å
\82 \82é.
\r
52 <h2>
\8aÖ
\98A
\8d\80\96Ú(
\8aÖ
\90\94)</h2>
\r
53 <a href="SDL_DestroyMutex.html">SDL_DestroyMutex</a><br>
\r
54 <a href="SDL_LockMutex.html">SDL_LockMutex</a><br>
\r
55 <a href="SDL_TryLockMutex.html">SDL_TryLockMutex</a><br>
\r
56 <a href="SDL_UnlockMutex.html">SDL_UnlockMutex</a><br>
\r
57 <h2>SDL Wiki
\82Ö
\82Ì
\83\8a\83\93\83N</h2>
\r
58 <a href="https://wiki.libsdl.org/SDL_CreateMutex">SDL_CreateMutex - SDL Wiki</a>
\r