mirror of
https://github.com/robotn/gohook.git
synced 2025-04-27 22:49:42 +08:00
patch for windows sched_yield
This commit is contained in:
parent
146f7aeeb5
commit
4761f184b8
@ -24,6 +24,14 @@
|
|||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#if defined(__MINGW32__) || defined(__CYGWIN__)
|
||||||
|
#include <windows.h>
|
||||||
|
int sched_yield() {
|
||||||
|
return SwitchToThread();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// #######################################################
|
// #######################################################
|
||||||
// ## eb_nsec.h
|
// ## eb_nsec.h
|
||||||
// #######################################################
|
// #######################################################
|
||||||
@ -1436,4 +1444,4 @@ eb_chan_op *eb_chan_select_list(eb_nsec timeout, eb_chan_op *const ops[], size_t
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#endif /* EB_CHAN_H */
|
#endif /* EB_CHAN_H */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user