Mercurial > sdl-ios-xcode
annotate docs/html/sdlcreatemutex.html @ 693:6c119628180d
Date: Sat, 16 Aug 2003 16:22:56 +0300
From: "Mike Gorchak"
Subject: Package building for QNX6
I'm just completed the package description file for QNX6 - qpg, it is like a\
.spec files for Linux. Please place SDL.qpg.in file in the root of the proj\
ect, where .spec file is placed. And sdl12qpg.diff - just adding the SDL.qpg\
.in. The same for the SDL_image. I'm planning to add .qpg files creation for\
all SDL* projects.
As for shared library building for QNX6. It is very hard to improve the exis\
ting libtool code to support QNX shared libraries. Much easyiest is to remov\
e libtool.m4 code from the acinclude.m4 for those persons, who building shar\
ed libraries for QNX6. I'm described all what they need to do with .so under\
QNX6 in the README.QNX file. And 90% of people used the precompiled librari\
es, so I think it is not big problem :)
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 23 Aug 2003 23:25:46 +0000 |
parents | e5bc29de3f0a |
children | 355632dca928 |
rev | line source |
---|---|
0 | 1 <HTML |
2 ><HEAD | |
3 ><TITLE | |
4 >SDL_CreateMutex</TITLE | |
5 ><META | |
6 NAME="GENERATOR" | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.64 |
0 | 8 "><LINK |
9 REL="HOME" | |
10 TITLE="SDL Library Documentation" | |
11 HREF="index.html"><LINK | |
12 REL="UP" | |
13 TITLE="Multi-threaded Programming" | |
14 HREF="thread.html"><LINK | |
15 REL="PREVIOUS" | |
16 TITLE="SDL_KillThread" | |
17 HREF="sdlkillthread.html"><LINK | |
18 REL="NEXT" | |
19 TITLE="SDL_DestroyMutex" | |
20 HREF="sdldestroymutex.html"></HEAD | |
21 ><BODY | |
22 CLASS="REFENTRY" | |
23 BGCOLOR="#FFF8DC" | |
24 TEXT="#000000" | |
25 LINK="#0000ee" | |
26 VLINK="#551a8b" | |
27 ALINK="#ff0000" | |
28 ><DIV | |
29 CLASS="NAVHEADER" | |
30 ><TABLE | |
31 WIDTH="100%" | |
32 BORDER="0" | |
33 CELLPADDING="0" | |
34 CELLSPACING="0" | |
35 ><TR | |
36 ><TH | |
37 COLSPAN="3" | |
38 ALIGN="center" | |
39 >SDL Library Documentation</TH | |
40 ></TR | |
41 ><TR | |
42 ><TD | |
43 WIDTH="10%" | |
44 ALIGN="left" | |
45 VALIGN="bottom" | |
46 ><A | |
47 HREF="sdlkillthread.html" | |
48 >Prev</A | |
49 ></TD | |
50 ><TD | |
51 WIDTH="80%" | |
52 ALIGN="center" | |
53 VALIGN="bottom" | |
54 ></TD | |
55 ><TD | |
56 WIDTH="10%" | |
57 ALIGN="right" | |
58 VALIGN="bottom" | |
59 ><A | |
60 HREF="sdldestroymutex.html" | |
61 >Next</A | |
62 ></TD | |
63 ></TR | |
64 ></TABLE | |
65 ><HR | |
66 ALIGN="LEFT" | |
67 WIDTH="100%"></DIV | |
68 ><H1 | |
69 ><A | |
70 NAME="SDLCREATEMUTEX" | |
71 >SDL_CreateMutex</A | |
72 ></H1 | |
73 ><DIV | |
74 CLASS="REFNAMEDIV" | |
75 ><A | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
76 NAME="AEN7432" |
0 | 77 ></A |
78 ><H2 | |
79 >Name</H2 | |
80 >SDL_CreateMutex -- Create a mutex</DIV | |
81 ><DIV | |
82 CLASS="REFSYNOPSISDIV" | |
83 ><A | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
84 NAME="AEN7435" |
0 | 85 ></A |
86 ><H2 | |
87 >Synopsis</H2 | |
88 ><DIV | |
89 CLASS="FUNCSYNOPSIS" | |
90 ><A | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
91 NAME="AEN7436" |
0 | 92 ></A |
93 ><P | |
94 ></P | |
95 ><PRE | |
96 CLASS="FUNCSYNOPSISINFO" | |
97 >#include "SDL.h" | |
98 #include "SDL_thread.h"</PRE | |
99 ><P | |
100 ><CODE | |
101 ><CODE | |
102 CLASS="FUNCDEF" | |
103 >SDL_mutex *<B | |
104 CLASS="FSFUNC" | |
105 >SDL_CreateMutex</B | |
106 ></CODE | |
107 >(void);</CODE | |
108 ></P | |
109 ><P | |
110 ></P | |
111 ></DIV | |
112 ></DIV | |
113 ><DIV | |
114 CLASS="REFSECT1" | |
115 ><A | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
116 NAME="AEN7442" |
0 | 117 ></A |
118 ><H2 | |
119 >Description</H2 | |
120 ><P | |
121 >Create a new, unlocked mutex.</P | |
122 ></DIV | |
123 ><DIV | |
124 CLASS="REFSECT1" | |
125 ><A | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
126 NAME="AEN7445" |
0 | 127 ></A |
128 ><H2 | |
129 >Examples</H2 | |
130 ><PRE | |
131 CLASS="PROGRAMLISTING" | |
132 >SDL_mutex *mut; | |
133 | |
134 mut=SDL_CreateMutex(); | |
135 . | |
136 . | |
137 if(SDL_mutexP(mut)==-1){ | |
138 fprintf(stderr, "Couldn't lock mutex\n"); | |
139 exit(-1); | |
140 } | |
141 . | |
142 /* Do stuff while mutex is locked */ | |
143 . | |
144 . | |
145 if(SDL_mutexV(mut)==-1){ | |
146 fprintf(stderr, "Couldn't unlock mutex\n"); | |
147 exit(-1); | |
148 } | |
149 | |
150 SDL_DestroyMutex(mut); </PRE | |
151 ></DIV | |
152 ><DIV | |
153 CLASS="REFSECT1" | |
154 ><A | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
155 NAME="AEN7448" |
0 | 156 ></A |
157 ><H2 | |
158 >See Also</H2 | |
159 ><P | |
160 ><A | |
161 HREF="sdlmutexp.html" | |
162 ><TT | |
163 CLASS="FUNCTION" | |
164 >SDL_mutexP</TT | |
165 ></A | |
166 >, | |
167 <A | |
168 HREF="sdlmutexv.html" | |
169 ><TT | |
170 CLASS="FUNCTION" | |
171 >SDL_mutexV</TT | |
172 ></A | |
173 >, | |
174 <A | |
175 HREF="sdldestroymutex.html" | |
176 ><TT | |
177 CLASS="FUNCTION" | |
178 >SDL_DestroyMutex</TT | |
179 ></A | |
180 ></P | |
181 ></DIV | |
182 ><DIV | |
183 CLASS="NAVFOOTER" | |
184 ><HR | |
185 ALIGN="LEFT" | |
186 WIDTH="100%"><TABLE | |
187 WIDTH="100%" | |
188 BORDER="0" | |
189 CELLPADDING="0" | |
190 CELLSPACING="0" | |
191 ><TR | |
192 ><TD | |
193 WIDTH="33%" | |
194 ALIGN="left" | |
195 VALIGN="top" | |
196 ><A | |
197 HREF="sdlkillthread.html" | |
198 >Prev</A | |
199 ></TD | |
200 ><TD | |
201 WIDTH="34%" | |
202 ALIGN="center" | |
203 VALIGN="top" | |
204 ><A | |
205 HREF="index.html" | |
206 >Home</A | |
207 ></TD | |
208 ><TD | |
209 WIDTH="33%" | |
210 ALIGN="right" | |
211 VALIGN="top" | |
212 ><A | |
213 HREF="sdldestroymutex.html" | |
214 >Next</A | |
215 ></TD | |
216 ></TR | |
217 ><TR | |
218 ><TD | |
219 WIDTH="33%" | |
220 ALIGN="left" | |
221 VALIGN="top" | |
222 >SDL_KillThread</TD | |
223 ><TD | |
224 WIDTH="34%" | |
225 ALIGN="center" | |
226 VALIGN="top" | |
227 ><A | |
228 HREF="thread.html" | |
229 >Up</A | |
230 ></TD | |
231 ><TD | |
232 WIDTH="33%" | |
233 ALIGN="right" | |
234 VALIGN="top" | |
235 >SDL_DestroyMutex</TD | |
236 ></TR | |
237 ></TABLE | |
238 ></DIV | |
239 ></BODY | |
240 ></HTML | |
241 > |