Mercurial > sdl-ios-xcode
comparison src/thread/amigaos/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 | c9b51268668f |
children | c71e05b4dc2e |
comparison
equal
deleted
inserted
replaced
1335:c39265384763 | 1336:3692456e7b0f |
---|---|
42 | 42 |
43 SDL_sem *SDL_CreateSemaphore(Uint32 initial_value) | 43 SDL_sem *SDL_CreateSemaphore(Uint32 initial_value) |
44 { | 44 { |
45 SDL_sem *sem; | 45 SDL_sem *sem; |
46 | 46 |
47 sem = (SDL_sem *)malloc(sizeof(*sem)); | 47 sem = (SDL_sem *)SDL_malloc(sizeof(*sem)); |
48 | 48 |
49 if ( ! sem ) { | 49 if ( ! sem ) { |
50 SDL_OutOfMemory(); | 50 SDL_OutOfMemory(); |
51 return(0); | 51 return(0); |
52 } | 52 } |
53 | 53 |
54 D(bug("Creating semaphore %lx...\n",sem)); | 54 D(bug("Creating semaphore %lx...\n",sem)); |
55 | 55 |
56 memset(sem,0,sizeof(*sem)); | 56 SDL_memset(sem,0,sizeof(*sem)); |
57 | 57 |
58 InitSemaphore(&sem->Sem); | 58 InitSemaphore(&sem->Sem); |
59 | 59 |
60 return(sem); | 60 return(sem); |
61 } | 61 } |
64 { | 64 { |
65 D(bug("Destroying semaphore %lx...\n",sem)); | 65 D(bug("Destroying semaphore %lx...\n",sem)); |
66 | 66 |
67 if ( sem ) { | 67 if ( sem ) { |
68 // Condizioni per liberare i task in attesa? | 68 // Condizioni per liberare i task in attesa? |
69 free(sem); | 69 SDL_free(sem); |
70 } | 70 } |
71 } | 71 } |
72 | 72 |
73 int SDL_SemTryWait(SDL_sem *sem) | 73 int SDL_SemTryWait(SDL_sem *sem) |
74 { | 74 { |