call isc_mutex_trylock rather than pthread_mutex_trylock
(cherry picked from commit c6e6cac4ea)
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user