]> granicus.if.org Git - libevent/commitdiff
Actually, move EVUTIL_NIL_STMT to util-internal.h
authorNick Mathewson <nickm@torproject.org>
Sun, 5 Apr 2009 04:10:05 +0000 (04:10 +0000)
committerNick Mathewson <nickm@torproject.org>
Sun, 5 Apr 2009 04:10:05 +0000 (04:10 +0000)
svn:r1135

evthread-internal.h
util-internal.h

index 4a3c515afa2390987b555d56a09a42b29502ab7b..2f0080a81f86dfc57513b1cce3ab157e4871afb1 100644 (file)
@@ -113,23 +113,18 @@ extern void (*_evthread_lock_free_fn)(void *);
        } while (0)
 #else /* _EVENT_DISABLE_THREAD_SUPPORT */
 
-/* No-op statement. */
-#define _EV_NIL_STMT ((void)0)
-
 #define EVTHREAD_GET_ID()      1
-#define EVTHREAD_ALLOC_LOCK(lockvar) _EV_NIL_STMT
-#define EVTHREAD_FREE_LOCK(lockvar) _EV_NIL_STMT
+#define EVTHREAD_ALLOC_LOCK(lockvar) _EVUTIL_NIL_STMT
+#define EVTHREAD_FREE_LOCK(lockvar) _EVUTIL_NIL_STMT
 
-#define EVLOCK_LOCK(lockvar, mode) _EV_NIL_STMT
-#define EVLOCK_UNLOCK(lockvar, mode) _EV_NIL_STMT
-#define EVLOCK_LOCK2(lock1,lock2,mode1,mode2) _EV_NIL_STMT
-#define EVLOCK_UNLOCK2(lock1,lock2,mode1,mode2) _EV_NIL_STMT
+#define EVLOCK_LOCK(lockvar, mode) _EVUTIL_NIL_STMT
+#define EVLOCK_UNLOCK(lockvar, mode) _EVUTIL_NIL_STMT
+#define EVLOCK_LOCK2(lock1,lock2,mode1,mode2) _EVUTIL_NIL_STMT
+#define EVLOCK_UNLOCK2(lock1,lock2,mode1,mode2) _EVUTIL_NIL_STMT
 
 #define EVBASE_IN_THREAD(base) 1
-#define EVBASE_ACQUIRE_LOCK(base, mode, lock) _EV_NIL_STMT
-#define EVBASE_RELEASE_LOCK(base, mode, lock) _EV_NIL_STMT
-
-#undef _EV_NIL_STMT
+#define EVBASE_ACQUIRE_LOCK(base, mode, lock) _EVUTIL_NIL_STMT
+#define EVBASE_RELEASE_LOCK(base, mode, lock) _EVUTIL_NIL_STMT
 
 #endif
 
index b429f57edd315dd57de39970fdc0e6655edc3d04..34ac6870e7d7907ef6b871c29020954913d1b2fc 100644 (file)
@@ -33,6 +33,9 @@
 extern "C" {
 #endif
 
+/* A good no-op to use in macro definitions. */
+#define _EVUTIL_NIL_STMT ((void)0)
+
 /* Internal use only: macros to match patterns of error codes in a
    cross-platform way.  We need these macros because of two historical
    reasons: first, nonblocking IO functions are generally written to give an