comparison src/thread/riscos/SDL_syscond.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
43 /* Create a condition variable */ 43 /* Create a condition variable */
44 SDL_cond * SDL_CreateCond(void) 44 SDL_cond * SDL_CreateCond(void)
45 { 45 {
46 SDL_cond *cond; 46 SDL_cond *cond;
47 47
48 cond = (SDL_cond *) malloc(sizeof(SDL_cond)); 48 cond = (SDL_cond *) SDL_malloc(sizeof(SDL_cond));
49 if ( cond ) { 49 if ( cond ) {
50 if ( pthread_cond_init(&cond->cond, NULL) < 0 ) { 50 if ( pthread_cond_init(&cond->cond, NULL) < 0 ) {
51 SDL_SetError("pthread_cond_init() failed"); 51 SDL_SetError("pthread_cond_init() failed");
52 free(cond); 52 SDL_free(cond);
53 cond = NULL; 53 cond = NULL;
54 } 54 }
55 } 55 }
56 return(cond); 56 return(cond);
57 } 57 }
59 /* Destroy a condition variable */ 59 /* Destroy a condition variable */
60 void SDL_DestroyCond(SDL_cond *cond) 60 void SDL_DestroyCond(SDL_cond *cond)
61 { 61 {
62 if ( cond ) { 62 if ( cond ) {
63 pthread_cond_destroy(&cond->cond); 63 pthread_cond_destroy(&cond->cond);
64 free(cond); 64 SDL_free(cond);
65 } 65 }
66 } 66 }
67 67
68 /* Restart one of the threads that are waiting on the condition variable */ 68 /* Restart one of the threads that are waiting on the condition variable */
69 int SDL_CondSignal(SDL_cond *cond) 69 int SDL_CondSignal(SDL_cond *cond)