Lines Matching defs:handle
47 static void uv__async_send(uv_async_t* handle);
51 int uv_async_init(uv_loop_t* loop, uv_async_t* handle, uv_async_cb async_cb) {
58 uv__handle_init(loop, (uv_handle_t*)handle, UV_ASYNC);
59 handle->async_cb = async_cb;
60 handle->pending = 0;
62 uv__queue_insert_tail(&loop->async_handles, &handle->queue);
63 uv__handle_start(handle);
69 int uv_async_send(uv_async_t* handle) {
73 if (handle == NULL) {
74 UV_LOGF("handle is NULL");
79 pending = (_Atomic int*) &handle->pending;
91 uv__async_send(handle);
97 void uv__async_close(uv_async_t* handle) {
98 atomic_exchange((_Atomic int*) &handle->pending, 0);
99 uv__queue_remove(&handle->queue);
100 uv__handle_stop(handle);
158 static void uv__async_send(uv_async_t* handle) {
164 uv_loop_t* loop = handle->loop;
185 while (r == -1 && errno == EINTR && atomic_load_explicit((_Atomic int*) &handle->pending, memory_order_relaxed) == 1);