FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

uv: upgrade to 87dbffbd · robby/node@30a0e58 · GitHub

Repository navigation

Commit 30a0e58

Browse files
authored andcommitted
uv: upgrade to 87dbffbd
1 parent b337577 commit 30a0e58

36 files changed

Lines changed: 914 additions & 597 deletions

‎deps/uv/include/uv-private/ev.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ enum {
623623
};
624624

625625
#if EV_PROTOTYPES
626-
void ev_run (EV_P_ int flags EV_CPP (= 0));
626+
void ev_run (EV_P_ ev_tstamp waittime);
627627
void ev_break (EV_P_ int how EV_CPP (= EVBREAK_ONE)); /* break out of the loop */
628628

629629
/*

‎deps/uv/include/uv-private/uv-unix.h‎

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -98,18 +98,21 @@ struct uv__io_s {
9898
# define UV_LOOP_PRIVATE_PLATFORM_FIELDS
9999
#endif
100100

101-
#define UV_LOOP_PRIVATE_FIELDS \
102-
/* Poll result queue */ \
103-
eio_channel uv_eio_channel; \
104-
struct ev_loop* ev; \
105-
/* Various thing for libeio. */ \
106-
uv_async_t uv_eio_want_poll_notifier; \
107-
uv_async_t uv_eio_done_poll_notifier; \
108-
uv_idle_t uv_eio_poller; \
109-
uv_handle_t* pending_handles; \
110-
ngx_queue_t prepare_handles; \
111-
ngx_queue_t check_handles; \
112-
ngx_queue_t idle_handles; \
101+
#define UV_LOOP_PRIVATE_FIELDS \
102+
/* Poll result queue */ \
103+
eio_channel uv_eio_channel; \
104+
struct ev_loop* ev; \
105+
/* Various thing for libeio. */ \
106+
uv_async_t uv_eio_want_poll_notifier; \
107+
uv_async_t uv_eio_done_poll_notifier; \
108+
uv_idle_t uv_eio_poller; \
109+
uv_handle_t* closing_handles; \
110+
ngx_queue_t prepare_handles; \
111+
ngx_queue_t check_handles; \
112+
ngx_queue_t idle_handles; \
113+
/* RB_HEAD(uv__timers, uv_timer_s) */ \
114+
struct uv__timers { struct uv_timer_s* rbh_root; } timer_handles; \
115+
uint64_t time; \
113116
UV_LOOP_PRIVATE_PLATFORM_FIELDS
114117

115118
#define UV_REQ_BUFSML_SIZE (4)
@@ -144,7 +147,7 @@ struct uv__io_s {
144147
/* TODO: union or classes please! */
145148
#define UV_HANDLE_PRIVATE_FIELDS \
146149
int flags; \
147-
uv_handle_t* next_pending; \
150+
uv_handle_t* next_closing; \
148151

149152

150153
#define UV_STREAM_PRIVATE_FIELDS \
@@ -186,7 +189,7 @@ struct uv__io_s {
186189
uv__io_t io_watcher;
187190

188191

189-
/* UV_PREPARE */ \
192+
/* UV_PREPARE */
190193
#define UV_PREPARE_PRIVATE_FIELDS \
191194
uv_prepare_cb prepare_cb; \
192195
ngx_queue_t queue;
@@ -211,9 +214,17 @@ struct uv__io_s {
211214

212215

213216
/* UV_TIMER */
214-
#define UV_TIMER_PRIVATE_FIELDS \
215-
ev_timer timer_watcher; \
216-
uv_timer_cb timer_cb;
217+
#define UV_TIMER_PRIVATE_FIELDS \
218+
/* RB_ENTRY(uv_timer_s) node; */ \
219+
struct { \
220+
struct uv_timer_s* rbe_left; \
221+
struct uv_timer_s* rbe_right; \
222+
struct uv_timer_s* rbe_parent; \
223+
int rbe_color; \
224+
} tree_entry; \
225+
uv_timer_cb timer_cb; \
226+
uint64_t timeout; \
227+
uint64_t repeat;
217228

218229
#define UV_GETADDRINFO_PRIVATE_FIELDS \
219230
uv_getaddrinfo_cb cb; \

‎deps/uv/include/uv-private/uv-win.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ RB_HEAD(uv_timer_tree_s, uv_timer_s);
454454
struct uv_process_close_s { \
455455
UV_REQ_FIELDS \
456456
} close_req; \
457-
HANDLE child_stdio[3]; \
457+
void* child_stdio_buffer; \
458458
int exit_signal; \
459459
DWORD spawn_errno; \
460460
HANDLE wait_handle; \

‎deps/uv/include/uv.h‎

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ typedef void (*uv_exit_cb)(uv_process_t*, int exit_status, int term_signal);
301301
typedef void (*uv_fs_cb)(uv_fs_t* req);
302302
typedef void (*uv_work_cb)(uv_work_t* req);
303303
typedef void (*uv_after_work_cb)(uv_work_t* req);
304+
typedef void (*uv_walk_cb)(uv_handle_t* handle, void* arg);
304305

305306
/*
306307
* This will be called repeatedly after the uv_fs_event_t is initialized.
@@ -382,6 +383,7 @@ struct uv_shutdown_s {
382383
/* read-only */ \
383384
uv_handle_type type; \
384385
/* private */ \
386+
ngx_queue_t handle_queue; \
385387
UV_HANDLE_PRIVATE_FIELDS \
386388

387389
/* The abstract base class of all handles. */
@@ -407,6 +409,12 @@ UV_EXTERN size_t uv_req_size(uv_req_type type);
407409
*/
408410
UV_EXTERN int uv_is_active(const uv_handle_t* handle);
409411

412+
/*
413+
* Walk the list of open handles.
414+
*/
415+
UV_EXTERN void uv_walk(uv_loop_t* loop, uv_walk_cb walk_cb, void* arg);
416+
417+
410418
/*
411419
* Request handle to be closed. close_cb will be called asynchronously after
412420
* this call. This MUST be called on each handle before memory is released.
@@ -1157,15 +1165,17 @@ UV_EXTERN void uv_freeaddrinfo(struct addrinfo* ai);
11571165

11581166
/* uv_spawn() options */
11591167
typedef enum {
1160-
UV_IGNORE = 0x00,
1161-
UV_CREATE_PIPE = 0x01,
1162-
/*
1163-
* UV_READABLE_PIPE and UV_WRITABLE_PIPE flags are set from
1164-
* the child process perspective.
1168+
UV_IGNORE = 0x00,
1169+
UV_CREATE_PIPE = 0x01,
1170+
UV_INHERIT_FD = 0x02,
1171+
UV_INHERIT_STREAM = 0x04,
1172+
1173+
/* When UV_CREATE_PIPE is specified, UV_READABLE_PIPE and UV_WRITABLE_PIPE
1174+
* determine the direction of flow, from the child process' perspective. Both
1175+
* flags may be specified to create a duplex data stream.
11651176
*/
1166-
UV_READABLE_PIPE = 0x02,
1167-
UV_WRITABLE_PIPE = 0x04,
1168-
UV_RAW_FD = 0x08
1177+
UV_READABLE_PIPE = 0x10,
1178+
UV_WRITABLE_PIPE = 0x20
11691179
} uv_stdio_flags;
11701180

11711181
typedef struct uv_stdio_container_s {
@@ -1211,10 +1221,16 @@ typedef struct uv_process_options_s {
12111221
uv_gid_t gid;
12121222

12131223
/*
1214-
* A container of stdio streams (stdin/stdout/stderr)
1224+
* The `stdio` field points to an array of uv_stdio_container_t structs that
1225+
* describe the file descriptors that will be made available to the child
1226+
* process. The convention is that stdio[0] points to stdin, fd 1 is used for
1227+
* stdout, and fd 2 is stderr.
1228+
*
1229+
* Note that on windows file descriptors greater than 2 are available to the
1230+
* child process only if the child processes uses the MSVCRT runtime.
12151231
*/
1216-
uv_stdio_container_t* stdio;
12171232
int stdio_count;
1233+
uv_stdio_container_t* stdio;
12181234
} uv_process_options_t;
12191235

12201236
/*
@@ -1238,7 +1254,15 @@ enum uv_process_flags {
12381254
* converting the argument list into a command line string. This option is
12391255
* only meaningful on Windows systems. On unix it is silently ignored.
12401256
*/
1241-
UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS = (1 << 2)
1257+
UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS = (1 << 2),
1258+
/*
1259+
* Spawn the child process in a detached state - this will make it a process
1260+
* group leader, and will effectively enable the child to keep running after
1261+
* the parent exits. Note that the child process will still keep the
1262+
* parent's event loop alive unless the parent process calls uv_unref() on
1263+
* the child's process handle.
1264+
*/
1265+
UV_PROCESS_DETACHED = (1 << 3)
12421266
};
12431267

12441268
/*
@@ -1668,6 +1692,7 @@ struct uv_loop_s {
16681692
uv_err_t last_err;
16691693
/* Loop reference counting */
16701694
unsigned int active_handles;
1695+
ngx_queue_t handle_queue;
16711696
ngx_queue_t active_reqs;
16721697
/* User data - use this for whatever. */
16731698
void* data;

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL