call isc_mutex_trylock rather than pthread_mutex_trylock

(cherry picked from commit c6e6cac4ea)
This commit is contained in:
Mark Andrews
2013-10-08 12:12:27 +11:00
parent 478320e6dd
commit 88ee7ab746
+2 -2
View File
@@ -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