summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--evthread_win32.c9
-rw-r--r--include/event2/thread.h4
2 files changed, 7 insertions, 6 deletions
diff --git a/evthread_win32.c b/evthread_win32.c
index 05ed9217..ad055107 100644
--- a/evthread_win32.c
+++ b/evthread_win32.c
@@ -55,7 +55,7 @@ evthread_win32_lock_free(void *_lock, unsigned locktype)
DeleteCriticalSection(lock);
}
-static void
+static int
evthread_win32_lock(unsigned mode, void *_lock)
{
CRITICAL_SECTION *lock = _lock;
@@ -67,11 +67,12 @@ evthread_win32_lock(unsigned mode, void *_lock)
}
}
-static void
+static int
evthread_win32_unlock(unsigned mode, void *_lock)
{
CRITICAL_SECTION *lock = _lock;
- LeaveCriticalSection(lock)
+ LeaveCriticalSection(lock);
+ return 0;
}
static unsigned long
@@ -86,7 +87,7 @@ evthread_use_windows_threads(void)
struct evthread_lock_callbacks cbs = {
EVTHREAD_LOCK_API_VERSION,
EVTHREAD_LOCKTYPE_RECURSIVE,
- evthread_win32_lock_alloc,
+ evthread_win32_lock_create,
evthread_win32_lock_free,
evthread_win32_lock,
evthread_win32_unlock
diff --git a/include/event2/thread.h b/include/event2/thread.h
index f9deca82..0540b7f9 100644
--- a/include/event2/thread.h
+++ b/include/event2/thread.h
@@ -170,11 +170,11 @@ int evthread_use_windows_threads(void);
int evthread_use_pthreads(void);
#define EVTHREAD_USE_PTHREADS_IMPLEMENTED 1
+#endif
+
/* XXXXX */
void evthread_enable_lock_debuging(void);
-#endif
-
#endif /* _EVENT_DISABLE_THREAD_SUPPORT */
struct event_base;