Fixed deterministic serialization on Windows.
This commit is contained in:
byuu
2019-10-17 21:42:42 +09:00
parent 9f86a3be26
commit 30d7fa1923
13 changed files with 41 additions and 45 deletions

View File

@@ -26,10 +26,6 @@ extern "C" {
static thread_local ucontext_t co_primary;
static thread_local ucontext_t* co_running = 0;
const char* co_module() {
return "ucontext";
}
cothread_t co_active() {
if(!co_running) co_running = &co_primary;
return (cothread_t)co_running;
@@ -81,6 +77,10 @@ void co_switch(cothread_t cothread) {
swapcontext(old_thread, co_running);
}
int co_serializable() {
return 0;
}
#ifdef __cplusplus
}
#endif