RetroArch
Classes | Macros | Typedefs | Enumerations | Functions | Variables
implement.h File Reference
#include "pte_osal.h"
#include "semaphore.h"
#include "sched.h"
Include dependency graph for implement.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pte_thread_t_
 
struct  pthread_attr_t_
 
struct  sem_t_
 
struct  pthread_mutex_t_
 
struct  pthread_mutexattr_t_
 
struct  pthread_spinlock_t_
 
struct  pthread_barrier_t_
 
struct  pthread_barrierattr_t_
 
struct  pthread_key_t_
 
struct  ThreadParms
 
struct  pthread_cond_t_
 
struct  pthread_condattr_t_
 
struct  pthread_rwlock_t_
 
struct  pthread_rwlockattr_t_
 
struct  pte_mcs_node_t_
 
struct  ThreadKeyAssoc
 

Macros

#define PTE_ATTR_VALID   ((unsigned long) 0xC4C0FFEE)
 
#define PTE_OBJECT_AUTO_INIT   ((void *) -1)
 
#define PTE_OBJECT_INVALID   0
 
#define PTE_SPIN_UNLOCKED   (1)
 
#define PTE_SPIN_LOCKED   (2)
 
#define PTE_SPIN_USE_MUTEX   (3)
 
#define PTE_RWLOCK_MAGIC   0xfacade2
 
#define PTE_EPS_EXIT   (1)
 
#define PTE_EPS_CANCEL   (2)
 
#define PTE_MAX(a, b)   ((a)<(b)?(b):(a))
 
#define PTE_MIN(a, b)   ((a)>(b)?(b):(a))
 
#define PTE_THREAD_REUSE_EMPTY   ((pte_thread_t *) 1)
 
#define PTE_ATOMIC_EXCHANGE   pte_osAtomicExchange
 
#define PTE_ATOMIC_EXCHANGE_ADD   pte_osAtomicExchangeAdd
 
#define PTE_ATOMIC_COMPARE_EXCHANGE   pte_osAtomicCompareExchange
 
#define PTE_ATOMIC_DECREMENT   pte_osAtomicDecrement
 
#define PTE_ATOMIC_INCREMENT   pte_osAtomicIncrement
 

Typedefs

typedef struct pte_thread_t_ pte_thread_t
 
typedef struct ThreadParms ThreadParms
 
typedef struct ThreadKeyAssoc ThreadKeyAssoc
 
typedef struct pte_mcs_node_t_ pte_mcs_local_node_t
 
typedef struct pte_mcs_node_t_pte_mcs_lock_t
 

Enumerations

enum  PThreadState {
  PThreadStateInitial = 0, PThreadStateRunning, PThreadStateSuspended, PThreadStateCancelPending,
  PThreadStateCanceling, PThreadStateException, PThreadStateLast
}
 

Functions

int pte_is_attr (const pthread_attr_t *attr)
 
int pte_cond_check_need_init (pthread_cond_t *cond)
 
int pte_mutex_check_need_init (pthread_mutex_t *mutex)
 
int pte_rwlock_check_need_init (pthread_rwlock_t *rwlock)
 
int pte_spinlock_check_need_init (pthread_spinlock_t *lock)
 
int pte_processInitialize (void)
 
void pte_processTerminate (void)
 
void pte_threadDestroy (pthread_t tid)
 
void pte_threadExitAndDestroy (pthread_t tid)
 
void pte_pop_cleanup_all (int execute)
 
pthread_t pte_new (void)
 
pthread_t pte_threadReusePop (void)
 
void pte_threadReusePush (pthread_t thread)
 
int pte_getprocessors (int *count)
 
int pte_setthreadpriority (pthread_t thread, int policy, int priority)
 
void pte_rwlock_cancelwrwait (void *arg)
 
int pte_threadStart (void *vthreadParms)
 
void pte_callUserDestroyRoutines (pthread_t thread)
 
int pte_tkAssocCreate (pte_thread_t *thread, pthread_key_t key)
 
void pte_tkAssocDestroy (ThreadKeyAssoc *assoc)
 
int sem_wait_nocancel (sem_t *sem)
 
unsigned int pte_relmillisecs (const struct timespec *abstime)
 
void pte_mcs_lock_acquire (pte_mcs_lock_t *lock, pte_mcs_local_node_t *node)
 
void pte_mcs_lock_release (pte_mcs_local_node_t *node)
 
void pte_throw (unsigned int exception)
 
int pte_cancellable_wait (pte_osSemaphoreHandle semHandle, unsigned int *timeout)
 
int pte_thread_detach_np ()
 
int pte_thread_detach_and_exit_np ()
 

Variables

int pte_processInitialized
 
pte_thread_tpte_threadReuseTop
 
pte_thread_tpte_threadReuseBottom
 
pthread_key_t pte_selfThreadKey
 
pthread_key_t pte_cleanupKey
 
pthread_cond_t pte_cond_list_head
 
pthread_cond_t pte_cond_list_tail
 
int pte_mutex_default_kind
 
int pte_concurrency
 
int pte_features
 
pte_osMutexHandle pte_thread_reuse_lock
 
pte_osMutexHandle pte_mutex_test_init_lock
 
pte_osMutexHandle pte_cond_list_lock
 
pte_osMutexHandle pte_cond_test_init_lock
 
pte_osMutexHandle pte_rwlock_test_init_lock
 
pte_osMutexHandle pte_spinlock_test_init_lock
 

Macro Definition Documentation

◆ PTE_ATOMIC_COMPARE_EXCHANGE

#define PTE_ATOMIC_COMPARE_EXCHANGE   pte_osAtomicCompareExchange

◆ PTE_ATOMIC_DECREMENT

#define PTE_ATOMIC_DECREMENT   pte_osAtomicDecrement

◆ PTE_ATOMIC_EXCHANGE

#define PTE_ATOMIC_EXCHANGE   pte_osAtomicExchange

◆ PTE_ATOMIC_EXCHANGE_ADD

#define PTE_ATOMIC_EXCHANGE_ADD   pte_osAtomicExchangeAdd

◆ PTE_ATOMIC_INCREMENT

#define PTE_ATOMIC_INCREMENT   pte_osAtomicIncrement

◆ PTE_ATTR_VALID

#define PTE_ATTR_VALID   ((unsigned long) 0xC4C0FFEE)

◆ PTE_EPS_CANCEL

#define PTE_EPS_CANCEL   (2)

◆ PTE_EPS_EXIT

#define PTE_EPS_EXIT   (1)

◆ PTE_MAX

#define PTE_MAX (   a,
  b 
)    ((a)<(b)?(b):(a))

◆ PTE_MIN

#define PTE_MIN (   a,
  b 
)    ((a)>(b)?(b):(a))

◆ PTE_OBJECT_AUTO_INIT

#define PTE_OBJECT_AUTO_INIT   ((void *) -1)

◆ PTE_OBJECT_INVALID

#define PTE_OBJECT_INVALID   0

◆ PTE_RWLOCK_MAGIC

#define PTE_RWLOCK_MAGIC   0xfacade2

◆ PTE_SPIN_LOCKED

#define PTE_SPIN_LOCKED   (2)

◆ PTE_SPIN_UNLOCKED

#define PTE_SPIN_UNLOCKED   (1)

◆ PTE_SPIN_USE_MUTEX

#define PTE_SPIN_USE_MUTEX   (3)

◆ PTE_THREAD_REUSE_EMPTY

#define PTE_THREAD_REUSE_EMPTY   ((pte_thread_t *) 1)

Typedef Documentation

◆ pte_mcs_local_node_t

◆ pte_mcs_lock_t

◆ pte_thread_t

typedef struct pte_thread_t_ pte_thread_t

◆ ThreadKeyAssoc

◆ ThreadParms

typedef struct ThreadParms ThreadParms

Enumeration Type Documentation

◆ PThreadState

Enumerator
PThreadStateInitial 
PThreadStateRunning 
PThreadStateSuspended 
PThreadStateCancelPending 
PThreadStateCanceling 
PThreadStateException 
PThreadStateLast 

Function Documentation

◆ pte_callUserDestroyRoutines()

void pte_callUserDestroyRoutines ( pthread_t  thread)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pte_cancellable_wait()

int pte_cancellable_wait ( pte_osSemaphoreHandle  semHandle,
unsigned int *  timeout 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pte_cond_check_need_init()

int pte_cond_check_need_init ( pthread_cond_t cond)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pte_getprocessors()

int pte_getprocessors ( int *  count)
Here is the caller graph for this function:

◆ pte_is_attr()

int pte_is_attr ( const pthread_attr_t attr)
Here is the caller graph for this function:

◆ pte_mcs_lock_acquire()

void pte_mcs_lock_acquire ( pte_mcs_lock_t lock,
pte_mcs_local_node_t node 
)

◆ pte_mcs_lock_release()

void pte_mcs_lock_release ( pte_mcs_local_node_t node)

◆ pte_mutex_check_need_init()

int pte_mutex_check_need_init ( pthread_mutex_t mutex)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pte_new()

pthread_t pte_new ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pte_pop_cleanup_all()

void pte_pop_cleanup_all ( int  execute)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pte_processInitialize()

int pte_processInitialize ( void  )

◆ pte_processTerminate()

void pte_processTerminate ( void  )

◆ pte_relmillisecs()

unsigned int pte_relmillisecs ( const struct timespec *  abstime)
Here is the caller graph for this function:

◆ pte_rwlock_cancelwrwait()

void pte_rwlock_cancelwrwait ( void arg)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pte_rwlock_check_need_init()

int pte_rwlock_check_need_init ( pthread_rwlock_t rwlock)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pte_setthreadpriority()

int pte_setthreadpriority ( pthread_t  thread,
int  policy,
int  priority 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pte_spinlock_check_need_init()

int pte_spinlock_check_need_init ( pthread_spinlock_t lock)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pte_thread_detach_and_exit_np()

int pte_thread_detach_and_exit_np ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pte_thread_detach_np()

int pte_thread_detach_np ( )
Here is the call graph for this function:

◆ pte_threadDestroy()

void pte_threadDestroy ( pthread_t  tid)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pte_threadExitAndDestroy()

void pte_threadExitAndDestroy ( pthread_t  tid)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pte_threadReusePop()

pthread_t pte_threadReusePop ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pte_threadReusePush()

void pte_threadReusePush ( pthread_t  thread)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pte_threadStart()

int pte_threadStart ( void vthreadParms)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pte_throw()

void pte_throw ( unsigned int  exception)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pte_tkAssocCreate()

int pte_tkAssocCreate ( pte_thread_t thread,
pthread_key_t  key 
)
Here is the caller graph for this function:

◆ pte_tkAssocDestroy()

void pte_tkAssocDestroy ( ThreadKeyAssoc assoc)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sem_wait_nocancel()

int sem_wait_nocancel ( sem_t sem)
Here is the call graph for this function:

Variable Documentation

◆ pte_cleanupKey

pthread_key_t pte_cleanupKey

◆ pte_concurrency

int pte_concurrency

◆ pte_cond_list_head

pthread_cond_t pte_cond_list_head

◆ pte_cond_list_lock

pte_osMutexHandle pte_cond_list_lock

◆ pte_cond_list_tail

pthread_cond_t pte_cond_list_tail

◆ pte_cond_test_init_lock

pte_osMutexHandle pte_cond_test_init_lock

◆ pte_features

int pte_features

◆ pte_mutex_default_kind

int pte_mutex_default_kind

◆ pte_mutex_test_init_lock

pte_osMutexHandle pte_mutex_test_init_lock

◆ pte_processInitialized

int pte_processInitialized

◆ pte_rwlock_test_init_lock

pte_osMutexHandle pte_rwlock_test_init_lock

◆ pte_selfThreadKey

pthread_key_t pte_selfThreadKey

◆ pte_spinlock_test_init_lock

pte_osMutexHandle pte_spinlock_test_init_lock

◆ pte_thread_reuse_lock

pte_osMutexHandle pte_thread_reuse_lock

◆ pte_threadReuseBottom

pte_thread_t* pte_threadReuseBottom

◆ pte_threadReuseTop

pte_thread_t* pte_threadReuseTop