1 .TH "SDL_CreateMutex" "3" "Tue 11 Sep 2001, 23:00" "SDL" "SDL API Reference"
3 SDL_CreateMutex\- Create a mutex
7 #include "SDL_thread\&.h"
9 \fBSDL_mutex *\fBSDL_CreateMutex\fP\fR(\fBvoid\fR);
12 Create a new, unlocked mutex\&.
18 mut=SDL_CreateMutex();
21 if(SDL_mutexP(mut)==-1){
22 fprintf(stderr, "Couldn\&'t lock mutex
27 /* Do stuff while mutex is locked */
30 if(SDL_mutexV(mut)==-1){
31 fprintf(stderr, "Couldn\&'t unlock mutex
36 SDL_DestroyMutex(mut);
42 \fI\fBSDL_mutexP\fP\fR, \fI\fBSDL_mutexV\fP\fR, \fI\fBSDL_DestroyMutex\fP\fR
43 ...\" created by instant / docbook-to-man, Tue 11 Sep 2001, 23:00