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

Macros

#define LIBCO_C
 

Functions

cothread_t co_active (void)
 
cothread_t co_create (unsigned int heapsize, void(*coentry)(void))
 
void co_delete (cothread_t cothread)
 
void co_switch (cothread_t cothread)
 

Variables

static thread_local ucontext_t co_primary
 
static thread_local ucontext_t * co_running = 0
 

Macro Definition Documentation

◆ LIBCO_C

#define LIBCO_C

Function Documentation

◆ co_active()

cothread_t co_active ( void  )

co_active:

Gets the currently active context.

Returns: active context.

◆ 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_delete()

void co_delete ( cothread_t  cothread)

co_delete: : cothread object

Frees a co_thread.

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 .

Variable Documentation

◆ co_primary

thread_local ucontext_t co_primary
static

◆ co_running

thread_local ucontext_t* co_running = 0
static