RetroArch
|
#include "libco.h"
#include <assert.h>
#include <stdlib.h>
#include <unistd.h>
#include <psp2/kernel/sysmem.h>
#include <stdio.h>
#include <string.h>
Macros | |
#define | LIBCO_C |
#define | FOUR_KB_ALIGN(x) align(x, 12) |
#define | MB_ALIGN(x) align(x, 20) |
Functions | |
static int | align (int x, int n) |
static void | co_init (void) |
cothread_t | co_active (void) |
cothread_t | co_create (unsigned int size, void(*entrypoint)(void)) |
void | co_delete (cothread_t handle) |
void | co_switch (cothread_t handle) |
Variables | |
static thread_local unsigned long | co_active_buffer [64] |
static thread_local cothread_t | co_active_handle = 0 |
static void(* | co_swap )(cothread_t, cothread_t)=0 |
static int | block |
static uint32_t | co_swap_function [] |
#define LIBCO_C |
|
inlinestatic |
cothread_t co_active | ( | void | ) |
co_active:
Gets the currently active context.
Returns: active context.
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.
void co_delete | ( | cothread_t | cothread | ) |
co_delete: : cothread object
Frees a co_thread.
void co_switch | ( | cothread_t | cothread | ) |
co_switch: : cothread object to switch to
Do a context switch to .
|
static |
|
static |
|
static |
|
static |
|
static |