Mercurial > sdl-ios-xcode
comparison src/thread/riscos/SDL_sysmutex.c @ 1338:604d73db6802
Removed uses of stdlib.h and string.h
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 07 Feb 2006 09:29:18 +0000 |
parents | 3692456e7b0f |
children | c71e05b4dc2e |
comparison
equal
deleted
inserted
replaced
1337:c687f06c7473 | 1338:604d73db6802 |
---|---|
24 | 24 |
25 #ifdef DISABLE_THREADS | 25 #ifdef DISABLE_THREADS |
26 #include "../generic/SDL_sysmutex.c" | 26 #include "../generic/SDL_sysmutex.c" |
27 #else | 27 #else |
28 | 28 |
29 #include <stdlib.h> | |
30 #include <stdio.h> | |
31 #include <pthread.h> | 29 #include <pthread.h> |
32 | 30 |
31 #include "SDL_stdlib.h" | |
33 #include "SDL_error.h" | 32 #include "SDL_error.h" |
34 #include "SDL_thread.h" | 33 #include "SDL_thread.h" |
35 | 34 |
36 struct SDL_mutex { | 35 struct SDL_mutex { |
37 pthread_mutex_t id; | 36 pthread_mutex_t id; |
45 { | 44 { |
46 SDL_mutex *mutex; | 45 SDL_mutex *mutex; |
47 pthread_mutexattr_t attr; | 46 pthread_mutexattr_t attr; |
48 | 47 |
49 /* Allocate the structure */ | 48 /* Allocate the structure */ |
50 mutex = (SDL_mutex *)calloc(1, sizeof(*mutex)); | 49 mutex = (SDL_mutex *)SDL_calloc(1, sizeof(*mutex)); |
51 if ( mutex ) { | 50 if ( mutex ) { |
52 pthread_mutexattr_init(&attr); | 51 pthread_mutexattr_init(&attr); |
53 #ifdef PTHREAD_NO_RECURSIVE_MUTEX | 52 #ifdef PTHREAD_NO_RECURSIVE_MUTEX |
54 /* No extra attributes necessary */ | 53 /* No extra attributes necessary */ |
55 #else | 54 #else |