diff options
author | Brad King <brad.king@kitware.com> | 2022-09-22 14:10:43 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-09-27 09:50:16 -0400 |
commit | ff82df301c6db009200cbe3869fa03b86a573253 (patch) | |
tree | df3700f506d1f03ce8176bc3fd3e8aa872630cce /Utilities/cmlibuv/src/win/req-inl.h | |
parent | cfe8fd64217d42c7a5c8a12c65feddbace86ce21 (diff) | |
parent | a23da1559648995998343f3ae63076db736b55a5 (diff) | |
download | cmake-ff82df301c6db009200cbe3869fa03b86a573253.tar.gz |
Merge branch 'upstream-libuv' into update-libuv
* upstream-libuv:
libuv 2022-07-12 (0c1fa696)
Diffstat (limited to 'Utilities/cmlibuv/src/win/req-inl.h')
-rw-r--r-- | Utilities/cmlibuv/src/win/req-inl.h | 43 |
1 files changed, 18 insertions, 25 deletions
diff --git a/Utilities/cmlibuv/src/win/req-inl.h b/Utilities/cmlibuv/src/win/req-inl.h index f2513b7d3e..9e2075906f 100644 --- a/Utilities/cmlibuv/src/win/req-inl.h +++ b/Utilities/cmlibuv/src/win/req-inl.h @@ -50,7 +50,7 @@ (pRtlNtStatusToDosError(GET_REQ_STATUS((req)))) #define GET_REQ_SOCK_ERROR(req) \ - (uv_ntstatus_to_winsock_error(GET_REQ_STATUS((req)))) + (uv__ntstatus_to_winsock_error(GET_REQ_STATUS((req)))) #define REGISTER_HANDLE_REQ(loop, handle, req) \ @@ -82,12 +82,12 @@ } -INLINE static uv_req_t* uv_overlapped_to_req(OVERLAPPED* overlapped) { +INLINE static uv_req_t* uv__overlapped_to_req(OVERLAPPED* overlapped) { return CONTAINING_RECORD(overlapped, uv_req_t, u.io.overlapped); } -INLINE static void uv_insert_pending_req(uv_loop_t* loop, uv_req_t* req) { +INLINE static void uv__insert_pending_req(uv_loop_t* loop, uv_req_t* req) { req->next_req = NULL; if (loop->pending_reqs_tail) { #ifdef _DEBUG @@ -115,19 +115,19 @@ INLINE static void uv_insert_pending_req(uv_loop_t* loop, uv_req_t* req) { do { \ switch (((uv_handle_t*) (req)->handle_at)->type) { \ case UV_TCP: \ - uv_process_tcp_##method##_req(loop, \ + uv__process_tcp_##method##_req(loop, \ (uv_tcp_t*) ((req)->handle_at), \ req); \ break; \ \ case UV_NAMED_PIPE: \ - uv_process_pipe_##method##_req(loop, \ + uv__process_pipe_##method##_req(loop, \ (uv_pipe_t*) ((req)->handle_at), \ req); \ break; \ \ case UV_TTY: \ - uv_process_tty_##method##_req(loop, \ + uv__process_tty_##method##_req(loop, \ (uv_tty_t*) ((req)->handle_at), \ req); \ break; \ @@ -138,13 +138,13 @@ INLINE static void uv_insert_pending_req(uv_loop_t* loop, uv_req_t* req) { } while (0) -INLINE static int uv_process_reqs(uv_loop_t* loop) { +INLINE static void uv__process_reqs(uv_loop_t* loop) { uv_req_t* req; uv_req_t* first; uv_req_t* next; if (loop->pending_reqs_tail == NULL) - return 0; + return; first = loop->pending_reqs_tail->next_req; next = first; @@ -172,50 +172,43 @@ INLINE static int uv_process_reqs(uv_loop_t* loop) { break; case UV_SHUTDOWN: - /* Tcp shutdown requests don't come here. */ - assert(((uv_shutdown_t*) req)->handle->type == UV_NAMED_PIPE); - uv_process_pipe_shutdown_req( - loop, - (uv_pipe_t*) ((uv_shutdown_t*) req)->handle, - (uv_shutdown_t*) req); + DELEGATE_STREAM_REQ(loop, (uv_shutdown_t*) req, shutdown, handle); break; case UV_UDP_RECV: - uv_process_udp_recv_req(loop, (uv_udp_t*) req->data, req); + uv__process_udp_recv_req(loop, (uv_udp_t*) req->data, req); break; case UV_UDP_SEND: - uv_process_udp_send_req(loop, - ((uv_udp_send_t*) req)->handle, - (uv_udp_send_t*) req); + uv__process_udp_send_req(loop, + ((uv_udp_send_t*) req)->handle, + (uv_udp_send_t*) req); break; case UV_WAKEUP: - uv_process_async_wakeup_req(loop, (uv_async_t*) req->data, req); + uv__process_async_wakeup_req(loop, (uv_async_t*) req->data, req); break; case UV_SIGNAL_REQ: - uv_process_signal_req(loop, (uv_signal_t*) req->data, req); + uv__process_signal_req(loop, (uv_signal_t*) req->data, req); break; case UV_POLL_REQ: - uv_process_poll_req(loop, (uv_poll_t*) req->data, req); + uv__process_poll_req(loop, (uv_poll_t*) req->data, req); break; case UV_PROCESS_EXIT: - uv_process_proc_exit(loop, (uv_process_t*) req->data); + uv__process_proc_exit(loop, (uv_process_t*) req->data); break; case UV_FS_EVENT_REQ: - uv_process_fs_event_req(loop, req, (uv_fs_event_t*) req->data); + uv__process_fs_event_req(loop, req, (uv_fs_event_t*) req->data); break; default: assert(0); } } - - return 1; } #endif /* UV_WIN_REQ_INL_H_ */ |