diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-03-28 14:13:19 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-04-26 12:18:07 -0400 |
commit | 8eedeabe50563ac6d679700ca9856a67875ceb39 (patch) | |
tree | 9a34aec1f7d11a79dda2386f62f3d690daa36ab9 /test/regress_thread.c | |
parent | 2fad0f3d52c6c7511231b1b2eced484306835a52 (diff) | |
download | libevent-8eedeabe50563ac6d679700ca9856a67875ceb39.tar.gz |
Implement event_finalize() and related functions to avoid certain deadlocks
Diffstat (limited to 'test/regress_thread.c')
-rw-r--r-- | test/regress_thread.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/test/regress_thread.c b/test/regress_thread.c index 809cbd86..612bf1d6 100644 --- a/test/regress_thread.c +++ b/test/regress_thread.c @@ -64,24 +64,7 @@ #include "regress.h" #include "tinytest_macros.h" #include "time-internal.h" - -#ifdef EVENT__HAVE_PTHREADS -#define THREAD_T pthread_t -#define THREAD_FN void * -#define THREAD_RETURN() return (NULL) -#define THREAD_START(threadvar, fn, arg) \ - pthread_create(&(threadvar), NULL, fn, arg) -#define THREAD_JOIN(th) pthread_join(th, NULL) -#else -#define THREAD_T HANDLE -#define THREAD_FN unsigned __stdcall -#define THREAD_RETURN() return (0) -#define THREAD_START(threadvar, fn, arg) do { \ - uintptr_t threadhandle = _beginthreadex(NULL,0,fn,(arg),0,NULL); \ - (threadvar) = (HANDLE) threadhandle; \ - } while (0) -#define THREAD_JOIN(th) WaitForSingleObject(th, INFINITE) -#endif +#include "regress_thread.h" struct cond_wait { void *lock; |