aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2025-07-07 22:08:11 +0200
committerGitHub <noreply@github.com>2025-07-07 22:08:11 +0200
commitb36dc711e69193db0204f254461f139dd82e096c (patch)
treedf2dc3272931bc8a1d1d3f775b129471559594d0 /src
parentdc117c7decf7a1e7c128e42993318edbd150373b (diff)
downloadlibuv-b36dc711e69193db0204f254461f139dd82e096c.tar.gz
libuv-b36dc711e69193db0204f254461f139dd82e096c.zip
win: move uv__process_endgames to core.c (#4827)
Refs: https://github.com/libuv/libuv/issues/4819
Diffstat (limited to 'src')
-rw-r--r--src/win/core.c68
-rw-r--r--src/win/handle-inl.h68
2 files changed, 68 insertions, 68 deletions
diff --git a/src/win/core.c b/src/win/core.c
index ec50ec47..989c73dd 100644
--- a/src/win/core.c
+++ b/src/win/core.c
@@ -629,6 +629,74 @@ static void uv__process_reqs(uv_loop_t* loop) {
#undef DELEGATE_STREAM_REQ
+static void uv__process_endgames(uv_loop_t* loop) {
+ uv_handle_t* handle;
+
+ while (loop->endgame_handles) {
+ handle = loop->endgame_handles;
+ loop->endgame_handles = handle->endgame_next;
+
+ handle->flags &= ~UV_HANDLE_ENDGAME_QUEUED;
+
+ switch (handle->type) {
+ case UV_TCP:
+ uv__tcp_endgame(loop, (uv_tcp_t*) handle);
+ break;
+
+ case UV_NAMED_PIPE:
+ uv__pipe_endgame(loop, (uv_pipe_t*) handle);
+ break;
+
+ case UV_TTY:
+ uv__tty_endgame(loop, (uv_tty_t*) handle);
+ break;
+
+ case UV_UDP:
+ uv__udp_endgame(loop, (uv_udp_t*) handle);
+ break;
+
+ case UV_POLL:
+ uv__poll_endgame(loop, (uv_poll_t*) handle);
+ break;
+
+ case UV_TIMER:
+ uv__timer_close((uv_timer_t*) handle);
+ uv__handle_close(handle);
+ break;
+
+ case UV_PREPARE:
+ case UV_CHECK:
+ case UV_IDLE:
+ uv__loop_watcher_endgame(loop, handle);
+ break;
+
+ case UV_ASYNC:
+ uv__async_endgame(loop, (uv_async_t*) handle);
+ break;
+
+ case UV_SIGNAL:
+ uv__signal_endgame(loop, (uv_signal_t*) handle);
+ break;
+
+ case UV_PROCESS:
+ uv__process_endgame(loop, (uv_process_t*) handle);
+ break;
+
+ case UV_FS_EVENT:
+ uv__fs_event_endgame(loop, (uv_fs_event_t*) handle);
+ break;
+
+ case UV_FS_POLL:
+ uv__fs_poll_endgame(loop, (uv_fs_poll_t*) handle);
+ break;
+
+ default:
+ assert(0);
+ break;
+ }
+ }
+}
+
int uv_run(uv_loop_t *loop, uv_run_mode mode) {
DWORD timeout;
diff --git a/src/win/handle-inl.h b/src/win/handle-inl.h
index 4722e857..e30d148c 100644
--- a/src/win/handle-inl.h
+++ b/src/win/handle-inl.h
@@ -95,74 +95,6 @@ INLINE static void uv__want_endgame(uv_loop_t* loop, uv_handle_t* handle) {
}
-INLINE static void uv__process_endgames(uv_loop_t* loop) {
- uv_handle_t* handle;
-
- while (loop->endgame_handles) {
- handle = loop->endgame_handles;
- loop->endgame_handles = handle->endgame_next;
-
- handle->flags &= ~UV_HANDLE_ENDGAME_QUEUED;
-
- switch (handle->type) {
- case UV_TCP:
- uv__tcp_endgame(loop, (uv_tcp_t*) handle);
- break;
-
- case UV_NAMED_PIPE:
- uv__pipe_endgame(loop, (uv_pipe_t*) handle);
- break;
-
- case UV_TTY:
- uv__tty_endgame(loop, (uv_tty_t*) handle);
- break;
-
- case UV_UDP:
- uv__udp_endgame(loop, (uv_udp_t*) handle);
- break;
-
- case UV_POLL:
- uv__poll_endgame(loop, (uv_poll_t*) handle);
- break;
-
- case UV_TIMER:
- uv__timer_close((uv_timer_t*) handle);
- uv__handle_close(handle);
- break;
-
- case UV_PREPARE:
- case UV_CHECK:
- case UV_IDLE:
- uv__loop_watcher_endgame(loop, handle);
- break;
-
- case UV_ASYNC:
- uv__async_endgame(loop, (uv_async_t*) handle);
- break;
-
- case UV_SIGNAL:
- uv__signal_endgame(loop, (uv_signal_t*) handle);
- break;
-
- case UV_PROCESS:
- uv__process_endgame(loop, (uv_process_t*) handle);
- break;
-
- case UV_FS_EVENT:
- uv__fs_event_endgame(loop, (uv_fs_event_t*) handle);
- break;
-
- case UV_FS_POLL:
- uv__fs_poll_endgame(loop, (uv_fs_poll_t*) handle);
- break;
-
- default:
- assert(0);
- break;
- }
- }
-}
-
INLINE static HANDLE uv__get_osfhandle(int fd)
{
/* _get_osfhandle() raises an assert in debug builds if the FD is invalid.