1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-08 12:15:49 +00:00

[GX] enable threads, build warning fixes

This commit is contained in:
ToadKing 2013-11-07 21:01:49 -05:00
parent 1ca96ccd82
commit f3fec499ca
4 changed files with 11 additions and 3 deletions

View File

@ -63,7 +63,7 @@ CFLAGS += -Iconsole/logger
endif
CFLAGS += -std=gnu99 -DSINC_LOWER_QUALITY -DHAVE_RGUI -DRARCH_CONSOLE -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RARCH_EXEC -DGEKKO -DHAVE_ZLIB -DWANT_MINIZ -DHAVE_RARCH_MAIN_WRAP -DHAVE_RARCH_MAIN_IMPLEMENTATION -DHAVE_GRIFFIN=1 -DHAVE_SCREENSHOTS -Wno-char-subscripts
CFLAGS += -std=gnu99 -DSINC_LOWER_QUALITY -DHAVE_RGUI -DRARCH_CONSOLE -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RARCH_EXEC -DGEKKO -DHAVE_ZLIB -DWANT_MINIZ -DHAVE_RARCH_MAIN_WRAP -DHAVE_RARCH_MAIN_IMPLEMENTATION -DHAVE_GRIFFIN=1 -DHAVE_SCREENSHOTS -DHAVE_THREADS -Wno-char-subscripts
ifeq ($(DEBUG), 1)
CFLAGS += -O0 -g -DDEBUG

View File

@ -21,6 +21,8 @@
#include <sys/timer.h>
#elif defined(XENON)
#include <time/time.h>
#elif defined(GEKKO) || defined(__PSL1GHT__) || defined(__QNX__)
#include <unistd.h>
#else
#include <time.h>
#endif

View File

@ -315,7 +315,7 @@ int scond_broadcast(scond_t *cond)
bool scond_wait_timeout(scond_t *cond, slock_t *lock, int64_t timeout_us)
{
struct timespec now;
struct timespec now = {0};
#ifdef __MACH__ // OSX doesn't have clock_gettime ... :(
clock_serv_t cclock;
@ -329,7 +329,7 @@ bool scond_wait_timeout(scond_t *cond, slock_t *lock, int64_t timeout_us)
sys_time_sec_t s;
sys_time_nsec_t n;
sys_time_get_current_time(&s, &n);
#else
#elif !defined(GEKKO) // timeout on libogc is duration, not end time
clock_gettime(CLOCK_REALTIME, &now);
#endif

View File

@ -66,6 +66,7 @@ static inline int pthread_detach(pthread_t thread)
{
/* FIXME: pthread_detach equivalent missing? */
(void)thread;
return 0;
}
static inline int pthread_join(pthread_t thread, void **retval)
@ -98,6 +99,11 @@ static inline int pthread_cond_signal(pthread_cond_t *cond)
return LWP_CondSignal(*cond);
}
static inline int pthread_cond_broadcast(pthread_cond_t *cond)
{
return LWP_CondBroadcast(*cond);
}
static inline int pthread_cond_destroy(pthread_cond_t *cond)
{
return LWP_CondDestroy(*cond);