(VITA) Silence rthreads

This commit is contained in:
frangarcj 2016-09-06 09:27:52 +02:00
parent 5be5ce8416
commit 434d70ce13

View File

@ -118,7 +118,6 @@ static INLINE int pthread_mutex_lock(pthread_mutex_t *mutex)
{
#ifdef VITA
int ret = sceKernelLockMutex(*mutex, 1, 0);
//sceClibPrintf("pthread_mutex_lock: %x\n",ret);
return ret;
#else
@ -131,7 +130,6 @@ static INLINE int pthread_mutex_unlock(pthread_mutex_t *mutex)
{
#ifdef VITA
int ret = sceKernelUnlockMutex(*mutex, 1);
//sceClibPrintf("pthread_mutex_unlock: %x\n",ret);
return ret;
#else
/* FIXME: stub */
@ -221,27 +219,25 @@ static INLINE int pthread_cond_init(pthread_cond_t *cond,
const pthread_condattr_t *attr)
{
#ifdef VITA
pthread_mutex_init(&cond->mutex,NULL);
sceClibPrintf("pthread_cond_init: mutex %x\n",cond->mutex);
if(cond->mutex<0){
return cond->mutex;
}
sprintf(name_buffer, "0x%08X", (uint32_t) cond);
//cond->sema = sceKernelCreateCond(name_buffer, 0, cond->mutex, 0);
cond->sema = sceKernelCreateSema(name_buffer, 0, 0, 1, 0);
sceClibPrintf("pthread_cond_init: sema %x\n",cond->sema);
if(cond->sema<0){
pthread_mutex_destroy(&cond->mutex);
return cond->sema;
}
cond->waiting = 0;
return 0;
#else
/* FIXME: stub */
return 1;
@ -256,7 +252,6 @@ static INLINE int pthread_cond_signal(pthread_cond_t *cond)
{
--cond->waiting;
int ret = sceKernelSignalSema(cond->sema, 1);
sceClibPrintf("pthread_cond_signal: %x\n",ret);
}
pthread_mutex_unlock(&cond->mutex);
return 0;