From 18ebcf2b30aec2f792678dea3d86a6201c20ebc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Witold=20Kr=C4=99cicki?= Date: Sat, 25 Aug 2018 13:25:51 +0200 Subject: [PATCH] Add runtime check on top of pthread_mutex_{lock,unlock} in rng --- lib/isc/xoshiro128starstar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/isc/xoshiro128starstar.c b/lib/isc/xoshiro128starstar.c index 9df1b4ba74..bc08e6740f 100644 --- a/lib/isc/xoshiro128starstar.c +++ b/lib/isc/xoshiro128starstar.c @@ -74,8 +74,8 @@ static volatile HANDLE _mutex = NULL; #include 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];