Browse Source

deps: upgrade libuv to 40134c3

v0.9.3-release
Ben Noordhuis 12 years ago
parent
commit
16a9dac8ea
  1. 8
      deps/uv/src/unix/threadpool.c
  2. 3
      deps/uv/test/runner-win.c
  3. 2
      deps/uv/test/test-list.h
  4. 1
      deps/uv/uv.gyp

8
deps/uv/src/unix/threadpool.c

@ -31,6 +31,7 @@ static pthread_once_t once = PTHREAD_ONCE_INIT;
static pthread_t threads[4]; static pthread_t threads[4];
static ngx_queue_t exit_message; static ngx_queue_t exit_message;
static ngx_queue_t wq = { &wq, &wq }; static ngx_queue_t wq = { &wq, &wq };
static volatile int initialized;
static void* worker(void* arg) { static void* worker(void* arg) {
@ -89,6 +90,8 @@ static void init_once(void) {
for (i = 0; i < ARRAY_SIZE(threads); i++) for (i = 0; i < ARRAY_SIZE(threads); i++)
if (pthread_create(threads + i, NULL, worker, NULL)) if (pthread_create(threads + i, NULL, worker, NULL))
abort(); abort();
initialized = 1;
} }
@ -97,11 +100,14 @@ static void cleanup(void) {
unsigned int i; unsigned int i;
int err; int err;
if (initialized == 0)
return;
post(&exit_message); post(&exit_message);
for (i = 0; i < ARRAY_SIZE(threads); i++) { for (i = 0; i < ARRAY_SIZE(threads); i++) {
err = pthread_join(threads[i], NULL); err = pthread_join(threads[i], NULL);
assert(err == 0 || err == EINVAL || err == ESRCH); assert(err == 0 || err == ESRCH);
(void) err; /* Silence compiler warning in release builds. */ (void) err; /* Silence compiler warning in release builds. */
} }
} }

3
deps/uv/test/runner-win.c

@ -24,6 +24,7 @@
#include <malloc.h> #include <malloc.h>
#include <stdio.h> #include <stdio.h>
#include <process.h> #include <process.h>
#include <crtdbg.h>
#include "task.h" #include "task.h"
#include "runner.h" #include "runner.h"
@ -43,6 +44,8 @@ void platform_init(int argc, char **argv) {
/* Disable the "application crashed" popup. */ /* Disable the "application crashed" popup. */
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX |
SEM_NOOPENFILEERRORBOX); SEM_NOOPENFILEERRORBOX);
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG);
_setmode(0, _O_BINARY); _setmode(0, _O_BINARY);
_setmode(1, _O_BINARY); _setmode(1, _O_BINARY);

2
deps/uv/test/test-list.h

@ -27,6 +27,7 @@ TEST_DECLARE (condvar_2)
TEST_DECLARE (condvar_3) TEST_DECLARE (condvar_3)
TEST_DECLARE (condvar_4) TEST_DECLARE (condvar_4)
TEST_DECLARE (condvar_5) TEST_DECLARE (condvar_5)
TEST_DECLARE (consumer_producer)
TEST_DECLARE (semaphore_1) TEST_DECLARE (semaphore_1)
TEST_DECLARE (semaphore_2) TEST_DECLARE (semaphore_2)
TEST_DECLARE (semaphore_3) TEST_DECLARE (semaphore_3)
@ -218,6 +219,7 @@ TASK_LIST_START
TEST_ENTRY (condvar_3) TEST_ENTRY (condvar_3)
TEST_ENTRY (condvar_4) TEST_ENTRY (condvar_4)
TEST_ENTRY (condvar_5) TEST_ENTRY (condvar_5)
TEST_ENTRY (consumer_producer)
TEST_ENTRY (semaphore_1) TEST_ENTRY (semaphore_1)
TEST_ENTRY (semaphore_2) TEST_ENTRY (semaphore_2)
TEST_ENTRY (semaphore_3) TEST_ENTRY (semaphore_3)

1
deps/uv/uv.gyp

@ -306,6 +306,7 @@
'test/test-signal.c', 'test/test-signal.c',
'test/test-thread.c', 'test/test-thread.c',
'test/test-condvar.c', 'test/test-condvar.c',
'test/test-condvar-consumer-producer.c',
'test/test-timer-again.c', 'test/test-timer-again.c',
'test/test-timer.c', 'test/test-timer.c',
'test/test-tty.c', 'test/test-tty.c',

Loading…
Cancel
Save