mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
(VITA) Let's use SDK pthreads
This commit is contained in:
parent
4197d81dcf
commit
c3bf05de96
@ -378,6 +378,9 @@ CFLAGS += -DHAVE_THREADS
|
||||
ifeq ($(platform), psp1)
|
||||
LIBS += -lpthread-psp
|
||||
endif
|
||||
ifeq ($(platform), vita)
|
||||
LIBS += -lpthread
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RSOUND), 1)
|
||||
|
@ -73,7 +73,7 @@ static int psp_thread_wrap(SceSize args, void *argp)
|
||||
static INLINE int pthread_create(pthread_t *thread,
|
||||
const pthread_attr_t *attr, void *(*start_routine)(void*), void *arg)
|
||||
{
|
||||
sprintf(name_buffer, "0x%08X", (uint32_t) thread);
|
||||
sprintf(name_buffer, "0x%08X", (unsigned int) thread);
|
||||
|
||||
#ifdef VITA
|
||||
*thread = sceKernelCreateThread(name_buffer, psp_thread_wrap,
|
||||
@ -93,7 +93,7 @@ static INLINE int pthread_create(pthread_t *thread,
|
||||
static INLINE int pthread_mutex_init(pthread_mutex_t *mutex,
|
||||
const pthread_mutexattr_t *attr)
|
||||
{
|
||||
sprintf(name_buffer, "0x%08X", (uint32_t) mutex);
|
||||
sprintf(name_buffer, "0x%08X", (unsigned int) mutex);
|
||||
|
||||
#ifdef VITA
|
||||
*mutex = sceKernelCreateMutex(name_buffer, 0, 0, 0);
|
||||
@ -224,7 +224,7 @@ static INLINE int pthread_cond_init(pthread_cond_t *cond,
|
||||
if(cond->mutex<0){
|
||||
return cond->mutex;
|
||||
}
|
||||
sprintf(name_buffer, "0x%08X", (uint32_t) cond);
|
||||
sprintf(name_buffer, "0x%08X", (unsigned int) cond);
|
||||
//cond->sema = sceKernelCreateCond(name_buffer, 0, cond->mutex, 0);
|
||||
cond->sema = sceKernelCreateSema(name_buffer, 0, 0, 1, 0);
|
||||
if(cond->sema<0){
|
||||
@ -251,7 +251,7 @@ static INLINE int pthread_cond_signal(pthread_cond_t *cond)
|
||||
if (cond->waiting)
|
||||
{
|
||||
--cond->waiting;
|
||||
int ret = sceKernelSignalSema(cond->sema, 1);
|
||||
sceKernelSignalSema(cond->sema, 1);
|
||||
}
|
||||
pthread_mutex_unlock(&cond->mutex);
|
||||
return 0;
|
||||
|
@ -41,7 +41,7 @@
|
||||
#endif
|
||||
#elif defined(GEKKO)
|
||||
#include "gx_pthread.h"
|
||||
#elif defined(PSP) || defined(VITA)
|
||||
#elif defined(PSP)
|
||||
#include "psp_pthread.h"
|
||||
#elif defined(__CELLOS_LV2__)
|
||||
#include <pthread.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user