comparison src/thread/dc/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
41 SDL_mutex *SDL_CreateMutex(void) 41 SDL_mutex *SDL_CreateMutex(void)
42 { 42 {
43 SDL_mutex *mutex; 43 SDL_mutex *mutex;
44 44
45 /* Allocate mutex memory */ 45 /* Allocate mutex memory */
46 mutex = (SDL_mutex *)malloc(sizeof(*mutex)); 46 mutex = (SDL_mutex *)SDL_malloc(sizeof(*mutex));
47 if ( mutex ) { 47 if ( mutex ) {
48 spinlock_init(&mutex->mutex); 48 spinlock_init(&mutex->mutex);
49 mutex->recursive = 0; 49 mutex->recursive = 0;
50 mutex->owner = 0; 50 mutex->owner = 0;
51 } else { 51 } else {
56 56
57 /* Free the mutex */ 57 /* Free the mutex */
58 void SDL_DestroyMutex(SDL_mutex *mutex) 58 void SDL_DestroyMutex(SDL_mutex *mutex)
59 { 59 {
60 if ( mutex ) { 60 if ( mutex ) {
61 free(mutex); 61 SDL_free(mutex);
62 } 62 }
63 } 63 }
64 64
65 /* Lock the semaphore */ 65 /* Lock the semaphore */
66 int SDL_mutexP(SDL_mutex *mutex) 66 int SDL_mutexP(SDL_mutex *mutex)