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_LockMutex</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_LockMutex
\r
14 <h1>SDL_LockMutex</h1>
\r
15 mutex
\82ð
\83\8d\83b
\83N
\82·
\82é
\r
17 <code>int SDL_LockMutex(SDL_mutex* mutex)</code>
\r
19 <table border="1" summary="SDL_LockMutex">
\r
20 <tr><td>mutex</td><td>
\83\8d\83b
\83N
\82·
\82émutex</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
31 mutex = SDL_CreateMutex();
\r
33 fprintf(stderr, "mutex
\82ð
\90¶
\90¬
\82Å
\82«
\82È
\82©
\82Á
\82½\n");
\r
37 if (SDL_LockMutex(mutex) == 0) {
\r
38 /*
\82±
\82±
\82Åmutex
\82ª
\83\8d\83b
\83N
\82³
\82ê
\82Ä
\82¢
\82é
\8aÔ
\82Ì
\8f\88\97\9d\82ð
\8ds
\82¤ */
\r
39 SDL_UnlockMutex(mutex);
\r
41 fprintf(stderr, "mutex
\82ð
\83\8d\83b
\83N
\82Å
\82«
\82È
\82©
\82Á
\82½\n");
\r
44 SDL_DestroyMutex(mutex);
\r
49 \91¼
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\83\8d\83b
\83N
\82³
\82ê
\82Ä
\82¢
\82é
\8aÔ
\82Í
\82±
\82Ì
\8aÖ
\90\94\82©
\82ç
\96ß
\82ç
\82È
\82¢.
\r
50 \83u
\83\8d\83b
\83N
\82¹
\82¸
\82É
\83\8d\83b
\83N
\82µ
\82½
\82¢
\8fê
\8d\87\82Í<a href="SDL_TryLockMutex.html">SDL_TryLockMutex</a>
\82ð
\8eg
\82¤
\82±
\82Æ.
\r
51 SDL
\82Ìmutex
\82Í
\8dÄ
\8bA
\93I
\82Å
\82 \82é.
\r
52 <h2>
\8aÖ
\98A
\8d\80\96Ú(
\8aÖ
\90\94)</h2>
\r
53 <a href="SDL_CreateMutex.html">SDL_CreateMutex</a><br>
\r
54 <a href="SDL_DestroyMutex.html">SDL_DestroyMutex</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_LockMutex">SDL_LockMutex - SDL Wiki</a>
\r