summaryrefslogtreecommitdiff
path: root/deps/uv/test/runner-win.c
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2012-04-29 00:22:01 +0200
committerBert Belder <bertbelder@gmail.com>2012-04-29 00:22:01 +0200
commitd2dd9d108d6bd61ac49522450b98ad57eac5be45 (patch)
treea53bd3b01637cff18fe01552f6a3cf006189929f /deps/uv/test/runner-win.c
parentc8a10e97c8def4c6a89f34f655b675d4204e16d4 (diff)
downloadandroid-node-v8-d2dd9d108d6bd61ac49522450b98ad57eac5be45.tar.gz
android-node-v8-d2dd9d108d6bd61ac49522450b98ad57eac5be45.tar.bz2
android-node-v8-d2dd9d108d6bd61ac49522450b98ad57eac5be45.zip
uv: upgrade to e2cae340a6
Diffstat (limited to 'deps/uv/test/runner-win.c')
-rw-r--r--deps/uv/test/runner-win.c63
1 files changed, 0 insertions, 63 deletions
diff --git a/deps/uv/test/runner-win.c b/deps/uv/test/runner-win.c
index d2a986a714..e758dd1dd3 100644
--- a/deps/uv/test/runner-win.c
+++ b/deps/uv/test/runner-win.c
@@ -274,69 +274,6 @@ void rewind_cursor() {
}
-typedef struct {
- void (*entry)(void* arg);
- void* arg;
-} thread_info_t;
-
-
-static unsigned __stdcall create_thread_helper(void* info) {
- /* Copy thread info locally, then free it */
- void (*entry)(void* arg) = ((thread_info_t*) info)->entry;
- void* arg = ((thread_info_t*) info)->arg;
-
- free(info);
-
- /* Run the actual thread proc */
- entry(arg);
-
- /* Finalize */
- _endthreadex(0);
- return 0;
-}
-
-
-/* Create a thread. Returns the thread identifier, or 0 on failure. */
-uintptr_t uv_create_thread(void (*entry)(void* arg), void* arg) {
- uintptr_t result;
- thread_info_t* info;
-
- info = (thread_info_t*) malloc(sizeof *info);
- if (info == NULL) {
- return 0;
- }
-
- info->entry = entry;
- info->arg = arg;
-
- result = _beginthreadex(NULL,
- 0,
- &create_thread_helper,
- (void*) info,
- 0,
- NULL);
-
- if (result == 0) {
- free(info);
- return 0;
- }
-
- return result;
-}
-
-
-/* Wait for a thread to terminate. Should return 0 if the thread ended, -1 on
- * error.
- */
-int uv_wait_thread(uintptr_t thread_id) {
- if (WaitForSingleObject((HANDLE)thread_id, INFINITE) != WAIT_OBJECT_0) {
- return -1;
- }
-
- return 0;
-}
-
-
/* Pause the calling thread for a number of milliseconds. */
void uv_sleep(int msec) {
Sleep(msec);