Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/libsnes/bsnes/libco/libco.h
2 views
1
/*
2
libco
3
version: 0.16 (2010-12-24)
4
license: public domain
5
*/
6
7
#ifndef LIBCO_H
8
#define LIBCO_H
9
10
#ifdef LIBCO_C
11
#ifdef LIBCO_MP
12
#define thread_local __thread
13
#else
14
#define thread_local
15
#endif
16
#endif
17
18
#ifdef __cplusplus
19
extern "C" {
20
#endif
21
22
typedef void* cothread_t;
23
typedef void (*coentry_t)(void);
24
25
#if defined(LIBCO_IMPORT)
26
#define LIBCO_IMPORTDECL __declspec(dllimport)
27
#elif defined(LIBCO_EXPORT)
28
#define LIBCO_IMPORTDECL __declspec(dllexport)
29
#else
30
#define LIBCO_IMPORTDECL
31
#endif
32
33
LIBCO_IMPORTDECL cothread_t co_active();
34
LIBCO_IMPORTDECL cothread_t co_create(unsigned int, coentry_t);
35
LIBCO_IMPORTDECL void co_delete(cothread_t);
36
LIBCO_IMPORTDECL void co_switch(cothread_t);
37
38
#ifdef __cplusplus
39
}
40
#endif
41
42
/* ifndef LIBCO_H */
43
#endif
44
45