Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Commit 5845a6b

Browse files
committed
uv: revert change causing build failures
Revert uv_thread_self() to return unsigned long instead of uv_thread_t. This was causing a build failure on Windows and is only a temporary fix until the proper patch lands upstream. Reverts: joyent/libuv@59658a8 Fixes: ce112c2 "deps: update uv to v1.0.0-rc2"
1 parent e46cbaa commit 5845a6b

File tree

9 files changed

+4
-65
lines changed

9 files changed

+4
-65
lines changed

deps/uv/Makefile.am

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ test_run_tests_SOURCES = test/blackhole-server.c \
206206
test/test-tcp-writealot.c \
207207
test/test-tcp-try-write.c \
208208
test/test-tcp-write-queue-order.c \
209-
test/test-thread-equal.c \
210209
test/test-thread.c \
211210
test/test-threadpool-cancel.c \
212211
test/test-threadpool.c \

deps/uv/docs/src/threading.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ Threads
5858
.. c:function:: int uv_thread_create(uv_thread_t* tid, uv_thread_cb entry, void* arg)
5959
.. c:function:: unsigned long uv_thread_self(void)
6060
.. c:function:: int uv_thread_join(uv_thread_t *tid)
61-
.. c:function:: int uv_thread_equal(const uv_thread_t* t1, const uv_thread_t* t2)
6261
6362
Thread-local storage
6463
^^^^^^^^^^^^^^^^^^^^

deps/uv/include/uv.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,9 +1369,8 @@ UV_EXTERN void uv_key_set(uv_key_t* key, void* value);
13691369
typedef void (*uv_thread_cb)(void* arg);
13701370

13711371
UV_EXTERN int uv_thread_create(uv_thread_t* tid, uv_thread_cb entry, void* arg);
1372-
UV_EXTERN uv_thread_t uv_thread_self(void);
1372+
UV_EXTERN unsigned long uv_thread_self(void);
13731373
UV_EXTERN int uv_thread_join(uv_thread_t *tid);
1374-
UV_EXTERN int uv_thread_equal(const uv_thread_t* t1, const uv_thread_t* t2);
13751374

13761375
/* The presence of these unions force similar struct layout. */
13771376
#define XX(_, name) uv_ ## name ## _t name;

deps/uv/src/unix/thread.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ int uv_thread_join(uv_thread_t *tid) {
3636
}
3737

3838

39-
int uv_thread_equal(const uv_thread_t* t1, const uv_thread_t* t2) {
40-
return pthread_equal(*t1, *t2);
41-
}
42-
43-
4439
int uv_mutex_init(uv_mutex_t* mutex) {
4540
#if defined(NDEBUG) || !defined(PTHREAD_MUTEX_ERRORCHECK)
4641
return -pthread_mutex_init(mutex, NULL);

deps/uv/src/uv-common.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,11 +306,11 @@ int uv_thread_create(uv_thread_t *tid, void (*entry)(void *arg), void *arg) {
306306
}
307307

308308

309-
uv_thread_t uv_thread_self(void) {
309+
unsigned long uv_thread_self(void) {
310310
#ifdef _WIN32
311-
return GetCurrentThreadId();
311+
return (unsigned long) GetCurrentThreadId();
312312
#else
313-
return pthread_self();
313+
return (unsigned long) pthread_self();
314314
#endif
315315
}
316316

deps/uv/src/win/thread.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,6 @@ int uv_thread_join(uv_thread_t *tid) {
129129
}
130130

131131

132-
int uv_thread_equal(const uv_thread_t* t1, const uv_thread_t* t2) {
133-
return *t1 == *t2;
134-
}
135-
136-
137132
int uv_mutex_init(uv_mutex_t* mutex) {
138133
InitializeCriticalSection(mutex);
139134
return 0;

deps/uv/test/test-list.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,6 @@ TEST_DECLARE (thread_local_storage)
259259
TEST_DECLARE (thread_mutex)
260260
TEST_DECLARE (thread_rwlock)
261261
TEST_DECLARE (thread_create)
262-
TEST_DECLARE (thread_equal)
263262
TEST_DECLARE (dlerror)
264263
TEST_DECLARE (poll_duplex)
265264
TEST_DECLARE (poll_unidirectional)
@@ -633,7 +632,6 @@ TASK_LIST_START
633632
TEST_ENTRY (thread_mutex)
634633
TEST_ENTRY (thread_rwlock)
635634
TEST_ENTRY (thread_create)
636-
TEST_ENTRY (thread_equal)
637635
TEST_ENTRY (dlerror)
638636
TEST_ENTRY (ip4_addr)
639637
TEST_ENTRY (ip6_addr_link_local)

deps/uv/test/test-thread-equal.c

Lines changed: 0 additions & 45 deletions
This file was deleted.

deps/uv/uv.gyp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,6 @@
410410
'test/test-tcp-write-queue-order.c',
411411
'test/test-threadpool.c',
412412
'test/test-threadpool-cancel.c',
413-
'test/test-thread-equal.c',
414413
'test/test-mutexes.c',
415414
'test/test-thread.c',
416415
'test/test-barrier.c',

0 commit comments

Comments
 (0)