1 /* 2 libco v18 (2016-09-14) 3 author: byuu 4 license: public domain 5 */ 6 7 #ifndef LIBCO_H 8 #define LIBCO_H 9 10 #include <stddef.h> 11 12 #ifdef __cplusplus 13 extern "C" { 14 #endif 15 16 typedef void* cothread_t; 17 18 cothread_t co_active(); 19 cothread_t co_create(unsigned int, void (*)(void), size_t *); 20 void co_delete(cothread_t); 21 void co_switch(cothread_t); 22 23 #ifdef __cplusplus 24 } 25 #endif 26 27 /* ifndef LIBCO_H */ 28 #endif 29