wut/libraries/wutstdc++/wut_gthread_mutex.cc
James Benton ac8a42fa7c Change to using new gthreads implementation.
Assuming that --enable-threads=dkp gets merged into devkitPPC r31... :)
2018-05-26 18:25:36 +01:00

38 lines
432 B
C++

#include "wut_gthread.h"
void
__wut_mutex_init_function(OSMutex *mutex)
{
OSInitMutex(mutex);
}
int
__wut_mutex_lock(OSMutex *mutex)
{
OSLockMutex(mutex);
return 0;
}
int
__wut_mutex_trylock(OSMutex *mutex)
{
if (!OSTryLockMutex(mutex)) {
return -1;
}
return 0;
}
int
__wut_mutex_unlock(OSMutex *mutex)
{
OSUnlockMutex(mutex);
return 0;
}
int
__wut_mutex_destroy(OSMutex *mutex)
{
return 0;
}