mirror of
https://github.com/janet-lang/janet
synced 2024-10-31 22:16:16 +00:00
Add kqueue option to meson, janetconf, fix typoes
This commit is contained in:
parent
a209a01284
commit
b445ecde51
@ -73,6 +73,7 @@ conf.set('JANET_NO_REALPATH', not get_option('realpath'))
|
|||||||
conf.set('JANET_NO_PROCESSES', not get_option('processes'))
|
conf.set('JANET_NO_PROCESSES', not get_option('processes'))
|
||||||
conf.set('JANET_SIMPLE_GETLINE', get_option('simple_getline'))
|
conf.set('JANET_SIMPLE_GETLINE', get_option('simple_getline'))
|
||||||
conf.set('JANET_EV_NO_EPOLL', not get_option('epoll'))
|
conf.set('JANET_EV_NO_EPOLL', not get_option('epoll'))
|
||||||
|
conf.set('JANET_EV_NO_KQUEUE', not get_option('kqueue'))
|
||||||
conf.set('JANET_NO_THREADS', get_option('threads'))
|
conf.set('JANET_NO_THREADS', get_option('threads'))
|
||||||
conf.set('JANET_NO_INTERPRETER_INTERRUPT', not get_option('interpreter_interrupt'))
|
conf.set('JANET_NO_INTERPRETER_INTERRUPT', not get_option('interpreter_interrupt'))
|
||||||
if get_option('os_name') != ''
|
if get_option('os_name') != ''
|
||||||
|
@ -18,6 +18,7 @@ option('umask', type : 'boolean', value : true)
|
|||||||
option('realpath', type : 'boolean', value : true)
|
option('realpath', type : 'boolean', value : true)
|
||||||
option('simple_getline', type : 'boolean', value : false)
|
option('simple_getline', type : 'boolean', value : false)
|
||||||
option('epoll', type : 'boolean', value : false)
|
option('epoll', type : 'boolean', value : false)
|
||||||
|
option('kqueue', type : 'boolen', value : false)
|
||||||
option('interpreter_interrupt', type : 'boolean', value : false)
|
option('interpreter_interrupt', type : 'boolean', value : false)
|
||||||
|
|
||||||
option('recursion_guard', type : 'integer', min : 10, max : 8000, value : 1024)
|
option('recursion_guard', type : 'integer', min : 10, max : 8000, value : 1024)
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
/* #define JANET_OS_NAME my-custom-os */
|
/* #define JANET_OS_NAME my-custom-os */
|
||||||
/* #define JANET_ARCH_NAME pdp-8 */
|
/* #define JANET_ARCH_NAME pdp-8 */
|
||||||
/* #define JANET_EV_NO_EPOLL */
|
/* #define JANET_EV_NO_EPOLL */
|
||||||
|
/* #define JANET_EV_NO_KQUEUE */
|
||||||
/* #define JANET_NO_INTERPRETER_INTERRUPT */
|
/* #define JANET_NO_INTERPRETER_INTERRUPT */
|
||||||
|
|
||||||
/* Custom vm allocator support */
|
/* Custom vm allocator support */
|
||||||
|
@ -1679,17 +1679,17 @@ void janet_loop1_impl(int has_timeout, JanetTimestamp timeout) {
|
|||||||
statuses[i] = JANET_ASYNC_STATUS_NOT_DONE;
|
statuses[i] = JANET_ASYNC_STATUS_NOT_DONE;
|
||||||
|
|
||||||
if (events[i].filter == EVFILT_WRITE)
|
if (events[i].filter == EVFILT_WRITE)
|
||||||
status[0] = state->machine(state, JANET_ASYNC_EVENT_WRITE);
|
statuses[0] = state->machine(state, JANET_ASYNC_EVENT_WRITE);
|
||||||
if (events[i].filter == EVFILT_READ)
|
if (events[i].filter == EVFILT_READ)
|
||||||
status[1] = state->machine(state, JANET_ASYNC_EVENT_READ);
|
statuses[1] = state->machine(state, JANET_ASYNC_EVENT_READ);
|
||||||
if (events[i].flags & EV_ERROR)
|
if (events[i].flags & EV_ERROR)
|
||||||
status[2] = state->machine(state, JANET_ASYNC_EVENT_ERR);
|
statuses[2] = state->machine(state, JANET_ASYNC_EVENT_ERR);
|
||||||
if ((events[i].flags & EV_EOF) && !(events[i].data > 0))
|
if ((events[i].flags & EV_EOF) && !(events[i].data > 0))
|
||||||
status[3] = state->maine(state, JANET_ASYNC_EVENT_HUP);
|
statuses[3] = state->maine(state, JANET_ASYNC_EVENT_HUP);
|
||||||
if(status[0] == JANET_ASYNC_STATUS_DONE ||
|
if(statuses[0] == JANET_ASYNC_STATUS_DONE ||
|
||||||
status[1] == JANET_ASYNC_STATUS_DONE ||
|
statuses[1] == JANET_ASYNC_STATUS_DONE ||
|
||||||
status[2] == JANET_ASYNC_STATUS_DONE ||
|
statuses[2] == JANET_ASYNC_STATUS_DONE ||
|
||||||
status[3] == JANET_ASYNC_STATUSDONE)
|
statuses[3] == JANET_ASYNC_STATUS_DONE)
|
||||||
janet_unlisten(state, 0);
|
janet_unlisten(state, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user