RetroArch
Macros | Typedefs | Functions
gx_pthread.h File Reference
#include <ogcsys.h>
#include <gccore.h>
#include <ogc/cond.h>
#include <retro_inline.h>
Include dependency graph for gx_pthread.h:

Go to the source code of this file.

Macros

#define OSThread   lwp_t
 
#define OSCond   lwpq_t
 
#define OSThreadQueue   lwpq_t
 
#define OSInitMutex(mutex)   LWP_MutexInit(mutex, 0)
 
#define OSLockMutex(mutex)   LWP_MutexLock(mutex)
 
#define OSUnlockMutex(mutex)   LWP_MutexUnlock(mutex)
 
#define OSTryLockMutex(mutex)   LWP_MutexTryLock(mutex)
 
#define OSInitCond(cond)   LWP_CondInit(cond)
 
#define OSWaitCond(cond, mutex)   LWP_CondWait(cond, mutex)
 
#define OSInitThreadQueue(queue)   LWP_InitQueue(queue)
 
#define OSSleepThread(queue)   LWP_ThreadSleep(queue)
 
#define OSJoinThread(thread, val)   LWP_JoinThread(thread, val)
 
#define OSCreateThread(thread, func, intarg, ptrarg, stackbase, stacksize, priority, attrs)   LWP_CreateThread(thread, func, ptrarg, stackbase, stacksize, priority)
 
#define STACKSIZE   (8 * 1024)
 

Typedefs

typedef OSThread pthread_t
 
typedef mutex_t pthread_mutex_t
 
typedef voidpthread_mutexattr_t
 
typedef int pthread_attr_t
 
typedef OSCond pthread_cond_t
 
typedef OSCond pthread_condattr_t
 

Functions

static INLINE int pthread_create (pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg)
 
static INLINE pthread_t pthread_self (void)
 
static INLINE int pthread_mutex_init (pthread_mutex_t *mutex, const pthread_mutexattr_t *attr)
 
static INLINE int pthread_mutex_destroy (pthread_mutex_t *mutex)
 
static INLINE int pthread_mutex_lock (pthread_mutex_t *mutex)
 
static INLINE int pthread_mutex_unlock (pthread_mutex_t *mutex)
 
static INLINE void pthread_exit (void *retval)
 
static INLINE int pthread_detach (pthread_t thread)
 
static INLINE int pthread_join (pthread_t thread, void **retval)
 
static INLINE int pthread_mutex_trylock (pthread_mutex_t *mutex)
 
static INLINE int pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex)
 
static INLINE int pthread_cond_timedwait (pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime)
 
static INLINE int pthread_cond_init (pthread_cond_t *cond, const pthread_condattr_t *attr)
 
static INLINE int pthread_cond_signal (pthread_cond_t *cond)
 
static INLINE int pthread_cond_broadcast (pthread_cond_t *cond)
 
static INLINE int pthread_cond_destroy (pthread_cond_t *cond)
 
int pthread_equal (pthread_t t1, pthread_t t2)
 

Macro Definition Documentation

◆ OSCond

#define OSCond   lwpq_t

◆ OSCreateThread

#define OSCreateThread (   thread,
  func,
  intarg,
  ptrarg,
  stackbase,
  stacksize,
  priority,
  attrs 
)    LWP_CreateThread(thread, func, ptrarg, stackbase, stacksize, priority)

◆ OSInitCond

#define OSInitCond (   cond)    LWP_CondInit(cond)

◆ OSInitMutex

#define OSInitMutex (   mutex)    LWP_MutexInit(mutex, 0)

◆ OSInitThreadQueue

#define OSInitThreadQueue (   queue)    LWP_InitQueue(queue)

◆ OSJoinThread

#define OSJoinThread (   thread,
  val 
)    LWP_JoinThread(thread, val)

◆ OSLockMutex

#define OSLockMutex (   mutex)    LWP_MutexLock(mutex)

◆ OSSleepThread

#define OSSleepThread (   queue)    LWP_ThreadSleep(queue)

◆ OSThread

typedef struct OSThread OSThread   lwp_t

◆ OSThreadQueue

#define OSThreadQueue   lwpq_t

◆ OSTryLockMutex

#define OSTryLockMutex (   mutex)    LWP_MutexTryLock(mutex)

◆ OSUnlockMutex

#define OSUnlockMutex (   mutex)    LWP_MutexUnlock(mutex)

◆ OSWaitCond

#define OSWaitCond (   cond,
  mutex 
)    LWP_CondWait(cond, mutex)

◆ STACKSIZE

#define STACKSIZE   (8 * 1024)

Typedef Documentation

◆ pthread_attr_t

typedef int pthread_attr_t

◆ pthread_cond_t

◆ pthread_condattr_t

◆ pthread_mutex_t

◆ pthread_mutexattr_t

◆ pthread_t

Function Documentation

◆ pthread_cond_broadcast()

static INLINE int pthread_cond_broadcast ( pthread_cond_t cond)
static
Here is the call graph for this function:

◆ pthread_cond_destroy()

static INLINE int pthread_cond_destroy ( pthread_cond_t cond)
static
Here is the call graph for this function:

◆ pthread_cond_init()

static INLINE int pthread_cond_init ( pthread_cond_t cond,
const pthread_condattr_t attr 
)
static
Here is the call graph for this function:

◆ pthread_cond_signal()

static INLINE int pthread_cond_signal ( pthread_cond_t cond)
static
Here is the call graph for this function:

◆ pthread_cond_timedwait()

static INLINE int pthread_cond_timedwait ( pthread_cond_t cond,
pthread_mutex_t mutex,
const struct timespec *  abstime 
)
static
Here is the call graph for this function:

◆ pthread_cond_wait()

static INLINE int pthread_cond_wait ( pthread_cond_t cond,
pthread_mutex_t mutex 
)
static
Here is the call graph for this function:

◆ pthread_create()

static INLINE int pthread_create ( pthread_t thread,
const pthread_attr_t attr,
void *(*)(void *)  start_routine,
void arg 
)
static

◆ pthread_detach()

static INLINE int pthread_detach ( pthread_t  thread)
static
Here is the call graph for this function:

◆ pthread_equal()

int pthread_equal ( pthread_t  t1,
pthread_t  t2 
)
Here is the caller graph for this function:

◆ pthread_exit()

static INLINE void pthread_exit ( void retval)
static
Here is the call graph for this function:

◆ pthread_join()

static INLINE int pthread_join ( pthread_t  thread,
void **  retval 
)
static

◆ pthread_mutex_destroy()

static INLINE int pthread_mutex_destroy ( pthread_mutex_t mutex)
static
Here is the call graph for this function:

◆ pthread_mutex_init()

static INLINE int pthread_mutex_init ( pthread_mutex_t mutex,
const pthread_mutexattr_t attr 
)
static

◆ pthread_mutex_lock()

static INLINE int pthread_mutex_lock ( pthread_mutex_t mutex)
static

◆ pthread_mutex_trylock()

static INLINE int pthread_mutex_trylock ( pthread_mutex_t mutex)
static

◆ pthread_mutex_unlock()

static INLINE int pthread_mutex_unlock ( pthread_mutex_t mutex)
static

◆ pthread_self()

static INLINE pthread_t pthread_self ( void  )
static
Here is the call graph for this function: