Skip to content

Commit

Permalink
Revert "deps: upgrade to libuv 1.46.0"
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Oct 11, 2023
1 parent aa6567a commit e069ec6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 24 deletions.
18 changes: 11 additions & 7 deletions patches/node/build_add_gn_build_files.patch
Original file line number Diff line number Diff line change
Expand Up @@ -929,10 +929,10 @@ index 0000000000000000000000000000000000000000..bfbd4e656db1a6c73048443f96f1d576
+}
diff --git a/deps/uv/BUILD.gn b/deps/uv/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..ae4d3bf68882f1aa6d7440448050fbdd9a17dca7
index 0000000000000000000000000000000000000000..29e66144dbb67704bad0d78c4b3f5713537c7987
--- /dev/null
+++ b/deps/uv/BUILD.gn
@@ -0,0 +1,194 @@
@@ -0,0 +1,197 @@
+config("libuv_config") {
+ include_dirs = [ "include" ]
+
Expand Down Expand Up @@ -1005,7 +1005,6 @@ index 0000000000000000000000000000000000000000..ae4d3bf68882f1aa6d7440448050fbdd
+ "src/strscpy.h",
+ "src/strtok.c",
+ "src/strtok.h",
+ "src/thread-common.c",
+ "src/threadpool.c",
+ "src/timer.c",
+ "src/uv-common.c",
Expand Down Expand Up @@ -1110,7 +1109,11 @@ index 0000000000000000000000000000000000000000..ae4d3bf68882f1aa6d7440448050fbdd
+ if (is_linux) {
+ defines += [ "_GNU_SOURCE" ]
+ sources += [
+ "src/unix/linux.c",
+ "src/unix/epoll.c",
+ "src/unix/linux-core.c",
+ "src/unix/linux-inotify.c",
+ "src/unix/linux-syscalls.c",
+ "src/unix/linux-syscalls.h",
+ "src/unix/procfs-exepath.c",
+ "src/unix/random-getrandom.c",
+ "src/unix/random-sysctl-linux.c",
Expand Down Expand Up @@ -1173,10 +1176,10 @@ index 0000000000000000000000000000000000000000..2c9d2826c85bdd033f1df1d6188df636
+}
diff --git a/filenames.json b/filenames.json
new file mode 100644
index 0000000000000000000000000000000000000000..12d4706fae0d8253db8de1fc2c4e31a6380cc122
index 0000000000000000000000000000000000000000..7d86765bf229275ba55d37a452ef24832a7afadb
--- /dev/null
+++ b/filenames.json
@@ -0,0 +1,663 @@
@@ -0,0 +1,664 @@
+// This file is automatically generated by generate_gn_filenames_json.py
+// DO NOT EDIT
+{
Expand Down Expand Up @@ -1290,6 +1293,7 @@ index 0000000000000000000000000000000000000000..12d4706fae0d8253db8de1fc2c4e31a6
+ "deps/uv/include/uv/linux.h",
+ "deps/uv/include/uv/os390.h",
+ "deps/uv/include/uv/posix.h",
+ "deps/uv/include/uv/stdint-msvc2008.h",
+ "deps/uv/include/uv/sunos.h",
+ "deps/uv/include/uv/threadpool.h",
+ "deps/uv/include/uv/tree.h",
Expand Down Expand Up @@ -2100,7 +2104,7 @@ index 0000000000000000000000000000000000000000..4ab828dcbf322a9e28674e48c4a6868b
+ args = rebase_path(inputs + outputs, root_build_dir)
+}
diff --git a/src/node_version.h b/src/node_version.h
index 7e90c796f3bd076048a2114a1ba31db7ee876440..60a17104e0b1b19038efc1a1468ee92642d3ffd6 100644
index ac1fc294a412b1a63b6f6bb4c49cd5ce34fb8ad7..eaa480cd63217dc9cd6868dff411932adef4ef08 100644
--- a/src/node_version.h
+++ b/src/node_version.h
@@ -89,7 +89,10 @@
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,17 @@ index 0ff2669e30a628dbb2df9e28ba14b38cf14114e5..679b17bda476d2a9c072ce8261234f83

-static void uv__async_send(uv_loop_t* loop);
static int uv__async_start(uv_loop_t* loop);
static void uv__cpu_relax(void);

@@ -78,7 +77,7 @@ int uv_async_send(uv_async_t* handle) {

@@ -70,7 +69,7 @@ int uv_async_send(uv_async_t* handle) {
return 0;

/* Wake up the other thread's event loop. */
if (atomic_exchange(pending, 1) == 0)
- uv__async_send(handle->loop);
+ uv__loop_interrupt(handle->loop);
- uv__async_send(handle->loop);
+ uv__loop_interrupt(handle->loop);

/* Set the loop to not-busy. */
atomic_fetch_add(busy, -1);
/* Tell the other thread we're done. */
if (cmpxchgi(&handle->pending, 1, 2) != 1)
@@ -178,40 +177,6 @@ static void uv__async_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
}

Expand Down Expand Up @@ -102,10 +102,10 @@ index 0ff2669e30a628dbb2df9e28ba14b38cf14114e5..679b17bda476d2a9c072ce8261234f83
int pipefd[2];
int err;
diff --git a/deps/uv/src/unix/core.c b/deps/uv/src/unix/core.c
index 25c5181f370e94983e8a5f797f02f7a8dc207e00..f4d9059796d2c65339a5d48ecb273b09d9364d21 100644
index 54c769f37f2331136c87a37c13fb4e3f9a8f22f9..ac52ab79a5fc3050effd2b1f2f605cee9b1ab336 100644
--- a/deps/uv/src/unix/core.c
+++ b/deps/uv/src/unix/core.c
@@ -926,6 +926,9 @@ void uv__io_start(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
@@ -900,6 +900,9 @@ void uv__io_start(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
loop->watchers[w->fd] = w;
loop->nfds++;
}
Expand All @@ -115,26 +115,26 @@ index 25c5181f370e94983e8a5f797f02f7a8dc207e00..f4d9059796d2c65339a5d48ecb273b09
}


@@ -957,6 +960,9 @@ void uv__io_stop(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
@@ -931,6 +934,9 @@ void uv__io_stop(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
}
else if (uv__queue_empty(&w->watcher_queue))
uv__queue_insert_tail(&loop->watcher_queue, &w->watcher_queue);
else if (QUEUE_EMPTY(&w->watcher_queue))
QUEUE_INSERT_TAIL(&loop->watcher_queue, &w->watcher_queue);
+
+ if (uv__get_internal_fields(loop)->flags & UV_LOOP_INTERRUPT_ON_IO_CHANGE)
+ uv__loop_interrupt(loop);
}


@@ -973,6 +979,9 @@ void uv__io_close(uv_loop_t* loop, uv__io_t* w) {
@@ -947,6 +953,9 @@ void uv__io_close(uv_loop_t* loop, uv__io_t* w) {
void uv__io_feed(uv_loop_t* loop, uv__io_t* w) {
if (uv__queue_empty(&w->pending_queue))
uv__queue_insert_tail(&loop->pending_queue, &w->pending_queue);
if (QUEUE_EMPTY(&w->pending_queue))
QUEUE_INSERT_TAIL(&loop->pending_queue, &w->pending_queue);
+
+ if (uv__get_internal_fields(loop)->flags & UV_LOOP_INTERRUPT_ON_IO_CHANGE)
+ uv__loop_interrupt(loop);
}


diff --git a/deps/uv/src/unix/loop.c b/deps/uv/src/unix/loop.c
index a9468e8e19cbede795032980c47eb83aee1e0c68..2d28cf48efc3718de19b901b7e08b8a857d20740 100644
--- a/deps/uv/src/unix/loop.c
Expand Down Expand Up @@ -463,7 +463,7 @@ index bbe56e176db17a502d7f3864ba529212f553590a..b0da9d1cddc69428e9fb3379d1338cf8
+ run_loop();
+ ASSERT_EQ(main_timer_called, 1);

MAKE_VALGRIND_HAPPY(loop);
MAKE_VALGRIND_HAPPY();
return 0;
diff --git a/deps/uv/test/test-list.h b/deps/uv/test/test-list.h
index 78ff9c2d1621676feab5d357609970cdf1ba5864..204160f324ad1a80c9b042e62c4bedcb745666ba 100644
Expand Down

0 comments on commit e069ec6

Please sign in to comment.