patch for windows sched_yield

This commit is contained in:
zeropool 2020-05-17 17:09:49 +08:00 committed by GitHub
parent 146f7aeeb5
commit 4761f184b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,6 +24,14 @@
#include <stddef.h>
#include <stdbool.h>
#if defined(__MINGW32__) || defined(__CYGWIN__)
#include <windows.h>
int sched_yield() {
return SwitchToThread();
}
#endif
// #######################################################
// ## eb_nsec.h
// #######################################################