comparison src/thread/riscos/SDL_sysmutex.c @ 1336:3692456e7b0f

Use SDL_ prefixed versions of C library functions. FIXME: Change #include <stdlib.h> to #include "SDL_stdlib.h" Change #include <string.h> to #include "SDL_string.h" Make sure nothing else broke because of this...
author Sam Lantinga <slouken@libsdl.org>
date Tue, 07 Feb 2006 06:59:48 +0000
parents c9b51268668f
children 604d73db6802
comparison
equal deleted inserted replaced
1335:c39265384763 1336:3692456e7b0f
55 #else 55 #else
56 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); 56 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
57 #endif /* PTHREAD_NO_RECURSIVE_MUTEX */ 57 #endif /* PTHREAD_NO_RECURSIVE_MUTEX */
58 if ( pthread_mutex_init(&mutex->id, &attr) != 0 ) { 58 if ( pthread_mutex_init(&mutex->id, &attr) != 0 ) {
59 SDL_SetError("pthread_mutex_init() failed"); 59 SDL_SetError("pthread_mutex_init() failed");
60 free(mutex); 60 SDL_free(mutex);
61 mutex = NULL; 61 mutex = NULL;
62 } 62 }
63 } else { 63 } else {
64 SDL_OutOfMemory(); 64 SDL_OutOfMemory();
65 } 65 }
68 68
69 void SDL_DestroyMutex(SDL_mutex *mutex) 69 void SDL_DestroyMutex(SDL_mutex *mutex)
70 { 70 {
71 if ( mutex ) { 71 if ( mutex ) {
72 pthread_mutex_destroy(&mutex->id); 72 pthread_mutex_destroy(&mutex->id);
73 free(mutex); 73 SDL_free(mutex);
74 } 74 }
75 } 75 }
76 76
77 /* Lock the mutex */ 77 /* Lock the mutex */
78 int SDL_mutexP(SDL_mutex *mutex) 78 int SDL_mutexP(SDL_mutex *mutex)