RetroArch
Macros | Enumerations | Functions | Variables
ppc.c File Reference
#include <libco.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
Include dependency graph for ppc.c:

Macros

#define LIBCO_C
 
#define LIBCO_MPROTECT   (__unix__ && !LIBCO_PPC_ASM)
 
#define LIBCO_PPC64   (_ARCH_PPC64 || __PPC64__ || __ppc64__ || __powerpc64__)
 
#define CO_SWAP_ASM(x, y)   ((void (*)( cothread_t, cothread_t )) (uintptr_t) libco_ppc_code)( x, y )
 

Enumerations

enum  { state_size = 1024 }
 
enum  { above_stack = 2048 }
 
enum  { stack_align = 256 }
 

Functions

static uint32_tco_create_ (unsigned size, uintptr_t entry)
 
cothread_t co_create (unsigned int size, void(*entry_)(void))
 
void co_delete (cothread_t t)
 
static void co_init_ (void)
 
cothread_t co_active (void)
 
void co_switch (cothread_t t)
 

Variables

static thread_local cothread_t co_active_handle = 0
 
static const uint32_t libco_ppc_code []
 

Macro Definition Documentation

◆ CO_SWAP_ASM

#define CO_SWAP_ASM (   x,
  y 
)    ((void (*)( cothread_t, cothread_t )) (uintptr_t) libco_ppc_code)( x, y )

◆ LIBCO_C

#define LIBCO_C

◆ LIBCO_MPROTECT

#define LIBCO_MPROTECT   (__unix__ && !LIBCO_PPC_ASM)

◆ LIBCO_PPC64

#define LIBCO_PPC64   (_ARCH_PPC64 || __PPC64__ || __ppc64__ || __powerpc64__)

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
state_size 

◆ anonymous enum

anonymous enum
Enumerator
above_stack 

◆ anonymous enum

anonymous enum
Enumerator
stack_align 

Function Documentation

◆ co_active()

cothread_t co_active ( void  )

co_active:

Gets the currently active context.

Returns: active context.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ co_create()

cothread_t co_create ( unsigned  int,
void(*)(void  
)

co_create: : stack size : thread entry function callback

Create a co_thread.

Returns: cothread if successful, otherwise NULL.

Here is the call graph for this function:

◆ co_create_()

static uint32_t* co_create_ ( unsigned  size,
uintptr_t  entry 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ co_delete()

void co_delete ( cothread_t  cothread)

co_delete: : cothread object

Frees a co_thread.

Here is the call graph for this function:

◆ co_init_()

static void co_init_ ( void  )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ co_switch()

void co_switch ( cothread_t  cothread)

co_switch: : cothread object to switch to

Do a context switch to .

Here is the caller graph for this function:

Variable Documentation

◆ co_active_handle

thread_local cothread_t co_active_handle = 0
static

◆ libco_ppc_code

const uint32_t libco_ppc_code[]
static