libco.h 427 B

12345678910111213141516171819202122232425262728
  1. /*
  2. libco v20 (2019-10-16)
  3. license: ISC
  4. */
  5. #ifndef LIBCO_H
  6. #define LIBCO_H
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. typedef void* cothread_t;
  11. cothread_t co_active(void);
  12. cothread_t co_derive(void*, unsigned int, void (*)(void));
  13. cothread_t co_create(unsigned int, void (*)(void));
  14. void co_delete(cothread_t);
  15. void co_switch(cothread_t);
  16. int co_serializable(void);
  17. #ifdef __cplusplus
  18. }
  19. #endif
  20. /* ifndef LIBCO_H */
  21. #endif