From f278e2135bd7f0aa99864083fb38a0c7ca8c1425 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 8 Aug 2003 04:39:46 +0000 Subject: [PATCH] pullup DESTROYMUTEXBLOCK, EMPTY_TRANSLATION_UNIT and TIME_NOW --- lib/isc/include/isc/util.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/isc/include/isc/util.h b/lib/isc/include/isc/util.h index 18c754ca9f..2d6ac60bdc 100644 --- a/lib/isc/include/isc/util.h +++ b/lib/isc/include/isc/util.h @@ -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 */