From 90722b645e9407db142f51278585a51c52f591c4 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 8 Jan 2015 20:15:03 +0100 Subject: [PATCH] Document libco.h --- libretro-sdk/include/libco.h | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/libretro-sdk/include/libco.h b/libretro-sdk/include/libco.h index 7d993f4cd8..93ea0fd86b 100644 --- a/libretro-sdk/include/libco.h +++ b/libretro-sdk/include/libco.h @@ -37,13 +37,41 @@ extern "C" { typedef void* cothread_t; +/** + * co_active: + * + * Gets the currently active context. + * + * Returns: active context. + **/ cothread_t co_active(void); +/** + * co_create: + * @int : size to allocate + * @funcptr : function callback + * + * Create a co_thread. + * + * Returns: cothread if successful, otherwise NULL. + */ cothread_t co_create(unsigned int, void (*)(void)); -void co_delete(cothread_t); +/** + * co_delete: + * @cothread : cothread object + * + * Frees a co_thread. + */ +void co_delete(cothread_t cothread); -void co_switch(cothread_t); +/** + * co_switch: + * @cothread : cothread object to switch to + * + * Do a context switch to @cothread. + */ +void co_switch(cothread_t cothread); #ifdef __cplusplus }