diff --git a/lib/isc/rwlock.c b/lib/isc/rwlock.c index 19d100be51..e944a1e5b5 100644 --- a/lib/isc/rwlock.c +++ b/lib/isc/rwlock.c @@ -24,16 +24,7 @@ #include #include -#define LOCK(lp) \ - INSIST(isc_mutex_lock((lp)) == ISC_R_SUCCESS); -#define UNLOCK(lp) \ - INSIST(isc_mutex_unlock((lp)) == ISC_R_SUCCESS); -#define BROADCAST(cvp) \ - INSIST(isc_condition_broadcast((cvp)) == ISC_R_SUCCESS); -#define SIGNAL(cvp) \ - INSIST(isc_condition_signal((cvp)) == ISC_R_SUCCESS); -#define WAIT(cvp, lp) \ - INSIST(isc_condition_wait((cvp), (lp)) == ISC_R_SUCCESS); +#include "util.h" #define RWLOCK_MAGIC 0x52574C6BU /* RWLk. */ #define VALID_RWLOCK(rwl) ((rwl) != NULL && \ diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c index e179d2f8c0..10e53b279b 100644 --- a/lib/isc/unix/socket.c +++ b/lib/isc/unix/socket.c @@ -34,28 +34,12 @@ #include #include +#include "util.h" + #ifndef _WIN32 #define WINAPI /* we're not windows */ #endif -/* - * We use macros instead of calling the routines directly because - * the capital letters make the locking stand out. - * - * We INSIST that they succeed since there's no way for us to continue - * if they fail. - */ - -#define LOCK(lp) do { \ - INSIST(isc_mutex_lock((lp)) == ISC_R_SUCCESS); \ - XTRACE(TRACE_LOCK, ("%d locked socket %p\n", __LINE__, lp)); \ -} while (0) - -#define UNLOCK(lp) do { \ - INSIST(isc_mutex_unlock((lp)) == ISC_R_SUCCESS); \ - XTRACE(TRACE_LOCK, ("%d unlocked socket %p\n", __LINE__, lp)); \ -} while (0) - #define ISC_TASK_SEND(a, b) do { \ INSIST(isc_task_send(a, b) == ISC_R_SUCCESS); \ } while (0);