From 88ee7ab7465b45da3d532acaad619a9b3ea4cb58 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 8 Oct 2013 12:11:09 +1100 Subject: [PATCH] call isc_mutex_trylock rather than pthread_mutex_trylock (cherry picked from commit c6e6cac4ea164be7130c32731522bd72c0ad43d5) --- lib/dns/zone.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 13df4691b8..2f266e9904 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -165,7 +165,7 @@ typedef struct dns_asyncload dns_asyncload_t; #define LOCKED_ZONE(z) ((z)->locked) #define TRYLOCK_ZONE(result, z) \ do { \ - result = pthread_mutex_trylock(&(z)->lock); \ + result = isc_mutex_trylock(&(z)->lock); \ if (result == ISC_R_SUCCESS) { \ INSIST((z)->locked == ISC_FALSE); \ (z)->locked = ISC_TRUE; \ @@ -176,7 +176,7 @@ typedef struct dns_asyncload dns_asyncload_t; #define UNLOCK_ZONE(z) UNLOCK(&(z)->lock) #define LOCKED_ZONE(z) ISC_TRUE #define TRYLOCK_ZONE(result, z) \ - do { result = pthread_mutex_trylock(&(z)->lock); } while (0) + do { result = isc_mutex_trylock(&(z)->lock); } while (0) #endif #ifdef ISC_RWLOCK_USEATOMIC