deps: upgrade libuv to 40134c3
This commit is contained in:
parent
da1f48328c
commit
16a9dac8ea
8
deps/uv/src/unix/threadpool.c
vendored
8
deps/uv/src/unix/threadpool.c
vendored
@ -31,6 +31,7 @@ static pthread_once_t once = PTHREAD_ONCE_INIT;
|
||||
static pthread_t threads[4];
|
||||
static ngx_queue_t exit_message;
|
||||
static ngx_queue_t wq = { &wq, &wq };
|
||||
static volatile int initialized;
|
||||
|
||||
|
||||
static void* worker(void* arg) {
|
||||
@ -89,6 +90,8 @@ static void init_once(void) {
|
||||
for (i = 0; i < ARRAY_SIZE(threads); i++)
|
||||
if (pthread_create(threads + i, NULL, worker, NULL))
|
||||
abort();
|
||||
|
||||
initialized = 1;
|
||||
}
|
||||
|
||||
|
||||
@ -97,11 +100,14 @@ static void cleanup(void) {
|
||||
unsigned int i;
|
||||
int err;
|
||||
|
||||
if (initialized == 0)
|
||||
return;
|
||||
|
||||
post(&exit_message);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(threads); i++) {
|
||||
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. */
|
||||
}
|
||||
}
|
||||
|
3
deps/uv/test/runner-win.c
vendored
3
deps/uv/test/runner-win.c
vendored
@ -24,6 +24,7 @@
|
||||
#include <malloc.h>
|
||||
#include <stdio.h>
|
||||
#include <process.h>
|
||||
#include <crtdbg.h>
|
||||
|
||||
#include "task.h"
|
||||
#include "runner.h"
|
||||
@ -43,6 +44,8 @@ void platform_init(int argc, char **argv) {
|
||||
/* Disable the "application crashed" popup. */
|
||||
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX |
|
||||
SEM_NOOPENFILEERRORBOX);
|
||||
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
|
||||
_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG);
|
||||
|
||||
_setmode(0, _O_BINARY);
|
||||
_setmode(1, _O_BINARY);
|
||||
|
2
deps/uv/test/test-list.h
vendored
2
deps/uv/test/test-list.h
vendored
@ -27,6 +27,7 @@ TEST_DECLARE (condvar_2)
|
||||
TEST_DECLARE (condvar_3)
|
||||
TEST_DECLARE (condvar_4)
|
||||
TEST_DECLARE (condvar_5)
|
||||
TEST_DECLARE (consumer_producer)
|
||||
TEST_DECLARE (semaphore_1)
|
||||
TEST_DECLARE (semaphore_2)
|
||||
TEST_DECLARE (semaphore_3)
|
||||
@ -218,6 +219,7 @@ TASK_LIST_START
|
||||
TEST_ENTRY (condvar_3)
|
||||
TEST_ENTRY (condvar_4)
|
||||
TEST_ENTRY (condvar_5)
|
||||
TEST_ENTRY (consumer_producer)
|
||||
TEST_ENTRY (semaphore_1)
|
||||
TEST_ENTRY (semaphore_2)
|
||||
TEST_ENTRY (semaphore_3)
|
||||
|
1
deps/uv/uv.gyp
vendored
1
deps/uv/uv.gyp
vendored
@ -306,6 +306,7 @@
|
||||
'test/test-signal.c',
|
||||
'test/test-thread.c',
|
||||
'test/test-condvar.c',
|
||||
'test/test-condvar-consumer-producer.c',
|
||||
'test/test-timer-again.c',
|
||||
'test/test-timer.c',
|
||||
'test/test-tty.c',
|
||||
|
Loading…
x
Reference in New Issue
Block a user