pullup DESTROYMUTEXBLOCK, EMPTY_TRANSLATION_UNIT and TIME_NOW

This commit is contained in:
Mark Andrews
2003-08-08 04:39:46 +00:00
parent fcb70eb568
commit f278e2135b
+15 -1
View File
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: util.h,v 1.21 2001/01/09 21:57:43 bwelling Exp $ */
/* $Id: util.h,v 1.21.12.1 2003/08/08 04:39:46 marka Exp $ */
#ifndef ISC_UTIL_H
#define ISC_UTIL_H 1
@@ -64,6 +64,12 @@
var = _u.v; \
} while (0)
/*
* Use this in translation units that would otherwise be empty, to
* suppress compiler warnings.
*/
#define EMPTY_TRANSLATION_UNIT static void isc__empty(void) { isc__empty(); }
/*
* We use macros instead of calling the routines directly because
* the capital letters make the locking stand out.
@@ -166,6 +172,9 @@
RUNTIME_CHECK(isc_rwlock_unlock((lp), (t)) == ISC_R_SUCCESS); \
} while (0)
#define DESTROYMUTEXBLOCK(bp, n) \
RUNTIME_CHECK(isc_mutexblock_destroy((bp), (n)) == ISC_R_SUCCESS)
/*
* List Macros.
*/
@@ -208,4 +217,9 @@
#define FATAL_ERROR isc_error_fatal
#define RUNTIME_CHECK(cond) ISC_ERROR_RUNTIMECHECK(cond)
/*
* Time
*/
#define TIME_NOW(tp) RUNTIME_CHECK(isc_time_now((tp)) == ISC_R_SUCCESS)
#endif /* ISC_UTIL_H */