2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-28 21:17:54 +00:00

Add runtime check on top of pthread_mutex_{lock,unlock} in rng

This commit is contained in:
Witold Kręcicki 2018-08-25 13:25:51 +02:00
parent 8c5aeb6c4c
commit 18ebcf2b30

View File

@ -74,8 +74,8 @@ static volatile HANDLE _mutex = NULL;
#include <pthread.h>
static pthread_mutex_t _mutex = PTHREAD_MUTEX_INITIALIZER;
#define _LOCK() pthread_mutex_lock(&_mutex)
#define _UNLOCK() pthread_mutex_unlock(&_mutex)
#define _LOCK() RUNTIME_CHECK(pthread_mutex_lock(&_mutex)==0)
#define _UNLOCK() RUNTIME_CHECK(pthread_mutex_unlock(&_mutex)==0)
#endif /* defined(_WIN32) || defined(_WIN64) */
static uint32_t seed[4];