RetroArch
|
#include <stdlib.h>
#include <errno.h>
#include "asm.h"
#include "processor.h"
#include "lwp_threadq.h"
#include "lwp_threads.h"
#include "lwp_wkspace.h"
#include "lwp_objmgr.h"
#include "lwp_config.h"
#include "lwp.h"
Classes | |
struct | _tqueue_st |
Macros | |
#define | LWP_OBJTYPE_THREAD 1 |
#define | LWP_OBJTYPE_TQUEUE 2 |
#define | LWP_CHECK_THREAD(hndl) |
#define | LWP_CHECK_TQUEUE(hndl) |
Typedefs | |
typedef struct _tqueue_st | tqueue_st |
Functions | |
int | __crtmain () |
static __inline__ u32 | __lwp_priotocore (u32 prio) |
static __inline__ lwp_cntrl * | __lwp_cntrl_open (lwp_t thr_id) |
static __inline__ tqueue_st * | __lwp_tqueue_open (lwpq_t tqueue) |
static lwp_cntrl * | __lwp_cntrl_allocate () |
static tqueue_st * | __lwp_tqueue_allocate () |
static __inline__ void | __lwp_cntrl_free (lwp_cntrl *thethread) |
static __inline__ void | __lwp_tqueue_free (tqueue_st *tq) |
static void * | idle_func (void *arg) |
void | __lwp_sysinit () |
BOOL | __lwp_thread_isalive (lwp_t thr_id) |
lwp_t | __lwp_thread_currentid () |
BOOL | __lwp_thread_exists (lwp_t thr_id) |
frame_context * | __lwp_thread_context (lwp_t thr_id) |
s32 | LWP_CreateThread (lwp_t *thethread, void *(*entry)(void *), void *arg, void *stackbase, u32 stack_size, u8 prio) |
s32 | LWP_SuspendThread (lwp_t thethread) |
Suspend the given thread. More... | |
s32 | LWP_ResumeThread (lwp_t thethread) |
Resume the given thread. More... | |
lwp_t | LWP_GetSelf () |
Return the handle to the current thread. More... | |
void | LWP_SetThreadPriority (lwp_t thethread, u32 prio) |
Set the priority of the given thread. More... | |
void | LWP_YieldThread () |
Yield the current thread to another one with higher priority or if not running at the same priority which state is runnable. More... | |
void | LWP_Reschedule (u32 prio) |
Reschedule all threads running at the given priority. More... | |
BOOL | LWP_ThreadIsSuspended (lwp_t thethread) |
Test whether the given thread is suspended or not. More... | |
s32 | LWP_JoinThread (lwp_t thethread, void **value_ptr) |
Join the given thread. More... | |
s32 | LWP_InitQueue (lwpq_t *thequeue) |
Initialize the thread synchronization queue. More... | |
void | LWP_CloseQueue (lwpq_t thequeue) |
Close the thread synchronization queue and releas the handle. More... | |
s32 | LWP_ThreadSleep (lwpq_t thequeue) |
Pushes the current thread onto the given thread synchronization queue and sets the thread state to blocked. More... | |
void | LWP_ThreadBroadcast (lwpq_t thequeue) |
Removes all blocked threads from the thread synchronization queue and sets them back to running state. More... | |
void | LWP_ThreadSignal (lwpq_t thequeue) |
Signals one thread to be revmoved from the thread synchronization queue and sets it back to running state. More... | |
Variables | |
lwp_objinfo | _lwp_thr_objects |
lwp_objinfo | _lwp_tqueue_objects |
u8 | __stack_addr [] |
u8 | __stack_end [] |
#define LWP_CHECK_THREAD | ( | hndl | ) |
#define LWP_CHECK_TQUEUE | ( | hndl | ) |
#define LWP_OBJTYPE_THREAD 1 |
#define LWP_OBJTYPE_TQUEUE 2 |
typedef struct _tqueue_st tqueue_st |
int __crtmain | ( | ) |
|
static |
frame_context* __lwp_thread_context | ( | lwp_t | thr_id | ) |
lwp_t __lwp_thread_currentid | ( | ) |
|
static |
Close the thread synchronization queue and releas the handle.
[in] | thequeue | handle to the thread's synchronization queue |
s32 LWP_CreateThread | ( | lwp_t * | thethread, |
void *(*)(void *) | entry, | ||
void * | arg, | ||
void * | stackbase, | ||
u32 | stack_size, | ||
u8 | prio | ||
) |
lwp_t LWP_GetSelf | ( | ) |
Return the handle to the current thread.
Initialize the thread synchronization queue.
[in] | thequeue | pointer to a lwpq_t handle. |
Join the given thread.
[in] | thethread | handle to the thread's context which should be joined to wait on termination. |
[in] | value_ptr | pointer-pointer to a variable to receive the return code of the terminated thread. |
Reschedule all threads running at the given priority.
[in] | prio | priority level to reschedule |
Resume the given thread.
[in] | thethread | handle to the thread context which should be resumed. |
Set the priority of the given thread.
[in] | thethread | handle to the thread context whos priority should be changed. If NULL, the current thread will be taken. |
[in] | prio | new priority to set |
Suspend the given thread.
[in] | thethread | handle to the thread context which should be suspended. |
Removes all blocked threads from the thread synchronization queue and sets them back to running state.
[in] | thequeue | handle to the thread's synchronization queue to pop the blocked threads off |
Test whether the given thread is suspended or not.
[in] | thethread | handle to the thread context which should be tested. |
Signals one thread to be revmoved from the thread synchronization queue and sets it back to running state.
[in] | thequeue | handle to the thread's synchronization queue to pop the blocked thread off |
Pushes the current thread onto the given thread synchronization queue and sets the thread state to blocked.
[in] | thequeue | handle to the thread's synchronization queue to push the thread on |
void LWP_YieldThread | ( | ) |
Yield the current thread to another one with higher priority or if not running at the same priority which state is runnable.
u8 __stack_addr[] |
u8 __stack_end[] |
lwp_objinfo _lwp_thr_objects |
lwp_objinfo _lwp_tqueue_objects |