⚠️ Warning: This is a draft ⚠️

This means it might contain formatting issues, incorrect code, conceptual problems, or other severe issues.

If you want to help to improve and eventually enable this page, please fork RosettaGit's repository and open a merge request on GitHub.

{{library}} libco is a tiny library that adds ''cooperative multithreading'', also known as ''coroutines'', to the [[C]] language.

typedef void* cothread_t;

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

You can get libco from http://byuu.org/programming/