mirror of
https://github.com/janet-lang/janet
synced 2025-10-21 10:47:40 +00:00
Reorder declarations.
This commit is contained in:
@@ -604,6 +604,19 @@ void janet_ev_init_common(void) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef JANET_WINDOWS
|
||||||
|
static VOID CALLBACK janet_timeout_stop(ULONG_PTR ptr) {
|
||||||
|
UNREFERENCED_PARAMETER(ptr);
|
||||||
|
ExitThread(0);
|
||||||
|
}
|
||||||
|
#elif JANET_ANDROID
|
||||||
|
static void janet_timeout_stop(int sig_num) {
|
||||||
|
if (sig_num == SIGUSR1) {
|
||||||
|
pthread_exit(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void handle_timeout_worker(JanetTimeout to) {
|
static void handle_timeout_worker(JanetTimeout to) {
|
||||||
if (!to.has_worker) return;
|
if (!to.has_worker) return;
|
||||||
#ifdef JANET_WINDOWS
|
#ifdef JANET_WINDOWS
|
||||||
@@ -671,19 +684,6 @@ void janet_addtimeout_nil(double sec) {
|
|||||||
add_timeout(to);
|
add_timeout(to);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef JANET_WINDOWS
|
|
||||||
static VOID CALLBACK janet_timeout_stop(ULONG_PTR ptr) {
|
|
||||||
UNREFERENCED_PARAMETER(ptr);
|
|
||||||
ExitThread(0);
|
|
||||||
}
|
|
||||||
#elif JANET_ANDROID
|
|
||||||
static void janet_timeout_stop(int sig_num) {
|
|
||||||
if (sig_num == SIGUSR1) {
|
|
||||||
pthread_exit(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void janet_timeout_cb(JanetEVGenericMessage msg) {
|
static void janet_timeout_cb(JanetEVGenericMessage msg) {
|
||||||
(void) msg;
|
(void) msg;
|
||||||
janet_interpreter_interrupt_handled(&janet_vm);
|
janet_interpreter_interrupt_handled(&janet_vm);
|
||||||
|
Reference in New Issue
Block a user