]> granicus.if.org Git - libevent/commitdiff
Fix up evthread compilation on windows
authorRoman Puls <puls@x-fabric.com>
Wed, 2 Dec 2009 06:15:15 +0000 (01:15 -0500)
committerunknown <Nick Mathewson@.(none)>
Wed, 2 Dec 2009 06:15:15 +0000 (01:15 -0500)
evthread_win32.c
include/event2/thread.h

index 05ed9217318660123fa6a21c938361173bd90c83..ad055107a471592854f0dc3b9513e0bee7163292 100644 (file)
@@ -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
index f9deca820be7331c7906d7555a8fc4ac3b6770b1..0540b7f954de90d3128c6ed290bb4e9e042a7c4f 100644 (file)
@@ -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;