RetroArch
Classes | Macros | Typedefs | Functions | Variables
threading.c File Reference
#include <reent.h>
#include <stdio.h>
#include <string.h>
#include <vitasdk/utils.h>
#include <psp2/kernel/threadmgr.h>
Include dependency graph for threading.c:

Classes

struct  reent_for_thread
 

Macros

#define MAX_THREADS   256
 
#define TLS_REENT_THID_PTR(thid)   sceKernelGetThreadTLSAddr(thid, 0x88)
 
#define TLS_REENT_PTR   sceKernelGetTLSAddr(0x88)
 
#define list_entry(ptr, type, member)   ((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member)))
 

Typedefs

typedef struct reent_for_thread reent_for_thread
 

Functions

int __vita_delete_thread_reent (int thid)
 
int vitasdk_delete_thread_reent (int thid)
 
int _exit_thread_common (int exit_status, int(*exit_func)(int))
 
int vita_exit_thread (int exit_status)
 
int vita_exit_delete_thread (int exit_status)
 
static void __vita_clean_reent (void)
 
static struct reent_for_thread__vita_allocate_reent (void)
 
struct _reent * __getreent_for_thread (int thid)
 
struct _reent * __getreent (void)
 
voidvitasdk_get_tls_data (SceUID thid)
 
voidvitasdk_get_pthread_data (SceUID thid)
 
void _init_vita_reent (void)
 
void _free_vita_reent (void)
 

Variables

static reent_for_thread reent_list [MAX_THREADS]
 
static int _newlib_reent_mutex
 
static struct _reent _newlib_global_reent
 

Macro Definition Documentation

◆ list_entry

#define list_entry (   ptr,
  type,
  member 
)    ((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member)))

◆ MAX_THREADS

#define MAX_THREADS   256

◆ TLS_REENT_PTR

#define TLS_REENT_PTR   sceKernelGetTLSAddr(0x88)

◆ TLS_REENT_THID_PTR

#define TLS_REENT_THID_PTR (   thid)    sceKernelGetThreadTLSAddr(thid, 0x88)

Typedef Documentation

◆ reent_for_thread

Function Documentation

◆ __getreent()

struct _reent* __getreent ( void  )
Here is the call graph for this function:

◆ __getreent_for_thread()

struct _reent* __getreent_for_thread ( int  thid)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __vita_allocate_reent()

static struct reent_for_thread* __vita_allocate_reent ( void  )
inlinestatic
Here is the caller graph for this function:

◆ __vita_clean_reent()

static void __vita_clean_reent ( void  )
inlinestatic
Here is the caller graph for this function:

◆ __vita_delete_thread_reent()

int __vita_delete_thread_reent ( int  thid)
Here is the caller graph for this function:

◆ _exit_thread_common()

int _exit_thread_common ( int  exit_status,
int(*)(int)  exit_func 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _free_vita_reent()

void _free_vita_reent ( void  )

◆ _init_vita_reent()

void _init_vita_reent ( void  )
Here is the call graph for this function:

◆ vita_exit_delete_thread()

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

◆ vita_exit_thread()

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

◆ vitasdk_delete_thread_reent()

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

◆ vitasdk_get_pthread_data()

void* vitasdk_get_pthread_data ( SceUID  thid)
Here is the call graph for this function:

◆ vitasdk_get_tls_data()

void* vitasdk_get_tls_data ( SceUID  thid)
Here is the call graph for this function:

Variable Documentation

◆ _newlib_global_reent

struct _reent _newlib_global_reent
static

◆ _newlib_reent_mutex

int _newlib_reent_mutex
static

◆ reent_list

reent_for_thread reent_list[MAX_THREADS]
static