int uv_poll_stop(uv_poll_t* handle) { if (!(handle->flags & UV_HANDLE_POLL_SLOW)) { return uv__fast_poll_set(handle->loop, handle, 0); } else { return uv__slow_poll_set(handle->loop, handle, 0); } }
int uv_poll_stop(uv_poll_t* handle) { int err; if (!(handle->flags & UV_HANDLE_POLL_SLOW)) { err = uv__fast_poll_set(handle->loop, handle, 0); } else { err = uv__slow_poll_set(handle->loop, handle, 0); } return uv_translate_sys_error(err); }
int uv_poll_start(uv_poll_t* handle, int events, uv_poll_cb cb) { if (!(handle->flags & UV_HANDLE_POLL_SLOW)) { if (uv__fast_poll_set(handle->loop, handle, events) < 0) return -1; } else { if (uv__slow_poll_set(handle->loop, handle, events) < 0) return -1; } handle->poll_cb = cb; return 0; }
int uv_poll_start(uv_poll_t* handle, int events, uv_poll_cb cb) { int err; if (!(handle->flags & UV_HANDLE_POLL_SLOW)) { err = uv__fast_poll_set(handle->loop, handle, events); } else { err = uv__slow_poll_set(handle->loop, handle, events); } if (err) { return uv_translate_sys_error(err); } handle->poll_cb = cb; return 0; }