summaryrefslogtreecommitdiffstatshomepage
path: root/trunk/src/lib/cothread/libco.h
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/src/lib/cothread/libco.h')
-rw-r--r--trunk/src/lib/cothread/libco.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/trunk/src/lib/cothread/libco.h b/trunk/src/lib/cothread/libco.h
new file mode 100644
index 00000000000..deb954fb4d6
--- /dev/null
+++ b/trunk/src/lib/cothread/libco.h
@@ -0,0 +1,34 @@
+/*
+ libco
+ version: 0.16 (2010-12-24)
+ license: public domain
+*/
+
+#ifndef LIBCO_H
+#define LIBCO_H
+
+#ifdef LIBCO_C
+ #ifdef LIBCO_MP
+ #define thread_local __thread
+ #else
+ #define thread_local
+ #endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void* cothread_t;
+
+cothread_t co_active();
+cothread_t co_create(unsigned int, void (*)(void));
+void co_delete(cothread_t);
+void co_switch(cothread_t);
+
+#ifdef __cplusplus
+}
+#endif
+
+/* ifndef LIBCO_H */
+#endif