comparison src/thread/generic/SDL_syssem.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 450721ad5436
children 604d73db6802
comparison
equal deleted inserted replaced
1335:c39265384763 1336:3692456e7b0f
83 83
84 SDL_sem *SDL_CreateSemaphore(Uint32 initial_value) 84 SDL_sem *SDL_CreateSemaphore(Uint32 initial_value)
85 { 85 {
86 SDL_sem *sem; 86 SDL_sem *sem;
87 87
88 sem = (SDL_sem *)malloc(sizeof(*sem)); 88 sem = (SDL_sem *)SDL_malloc(sizeof(*sem));
89 if ( ! sem ) { 89 if ( ! sem ) {
90 SDL_OutOfMemory(); 90 SDL_OutOfMemory();
91 return(0); 91 return(0);
92 } 92 }
93 sem->count = initial_value; 93 sem->count = initial_value;
116 } 116 }
117 SDL_DestroyCond(sem->count_nonzero); 117 SDL_DestroyCond(sem->count_nonzero);
118 SDL_mutexP(sem->count_lock); 118 SDL_mutexP(sem->count_lock);
119 SDL_mutexV(sem->count_lock); 119 SDL_mutexV(sem->count_lock);
120 SDL_DestroyMutex(sem->count_lock); 120 SDL_DestroyMutex(sem->count_lock);
121 free(sem); 121 SDL_free(sem);
122 } 122 }
123 } 123 }
124 124
125 int SDL_SemTryWait(SDL_sem *sem) 125 int SDL_SemTryWait(SDL_sem *sem)
126 { 126 {