Skip to content

Commit

Permalink
deps: upgrade libuv to 06e0319
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Jun 5, 2012
1 parent 0742f56 commit cb76999
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
1 change: 0 additions & 1 deletion deps/uv/src/unix/ev/ev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2554,7 +2554,6 @@ void
ev_unref (EV_P)
{
--activecnt;
if (activecnt < 0) abort();
}

void
Expand Down
11 changes: 9 additions & 2 deletions deps/uv/src/unix/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -523,12 +523,19 @@ static void uv__read(uv_stream_t* stream) {
struct cmsghdr* cmsg;
char cmsg_space[64];
struct ev_loop* ev = stream->loop->ev;
int count;

/* Prevent loop starvation when the data comes in as fast as (or faster than)
* we can read it. XXX Need to rearm fd if we switch to edge-triggered I/O.
*/
count = 32;

/* XXX: Maybe instead of having UV_READING we just test if
* tcp->read_cb is NULL or not?
*/
while ((stream->read_cb || stream->read2_cb) &&
stream->flags & UV_READING) {
while ((stream->read_cb || stream->read2_cb)
&& (stream->flags & UV_READING)
&& (count-- > 0)) {
assert(stream->alloc_cb);
buf = stream->alloc_cb((uv_handle_t*)stream, 64 * 1024);

Expand Down
8 changes: 7 additions & 1 deletion deps/uv/src/unix/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,17 @@ static void uv__udp_recvmsg(uv_udp_t* handle) {
ssize_t nread;
uv_buf_t buf;
int flags;
int count;

assert(handle->recv_cb != NULL);
assert(handle->alloc_cb != NULL);

/* Prevent loop starvation when the data comes in as fast as (or faster than)
* we can read it. XXX Need to rearm fd if we switch to edge-triggered I/O.
*/
count = 32;

do {
/* FIXME: hoist alloc_cb out the loop but for now follow uv__read() */
buf = handle->alloc_cb((uv_handle_t*)handle, 64 * 1024);
assert(buf.len > 0);
assert(buf.base != NULL);
Expand Down Expand Up @@ -254,6 +259,7 @@ static void uv__udp_recvmsg(uv_udp_t* handle) {
}
/* recv_cb callback may decide to pause or close the handle */
while (nread != -1
&& count-- > 0
&& handle->fd != -1
&& handle->recv_cb != NULL);
}
Expand Down
2 changes: 1 addition & 1 deletion deps/uv/src/win/tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ void uv_process_tty_read_line_req(uv_loop_t* loop, uv_tty_t* handle,
if (!REQ_SUCCESS(req)) {
/* Read was not successful */
if ((handle->flags & UV_HANDLE_READING) &&
!(handle->flags & UV_HANDLE_TTY_RAW)) {
handle->read_line_handle != NULL) {
/* Real error */
handle->flags &= ~UV_HANDLE_READING;
uv__set_sys_error(loop, GET_REQ_ERROR(req));
Expand Down
1 change: 1 addition & 0 deletions deps/uv/test/runner.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ int run_test(const char* test, int timeout, int benchmark_output) {
int i;

status = 255;
main_proc = NULL;
process_count = 0;

/* If it's a helper the user asks for, start it directly. */
Expand Down

0 comments on commit cb76999

Please sign in to comment.