diff options
author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2020-05-29 16:52:15 +0200 |
---|---|---|
committer | Sander Vrijders <sander@ouroboros.rocks> | 2020-05-29 17:06:41 +0200 |
commit | 7a6bc98a1ea07991d8ff00a9b77be196bd9cef45 (patch) | |
tree | adf147e45fe227425b00cc09ecdae3b9ffb7372e | |
parent | bd6cce48b929468f6afc5294de19b688494c3a71 (diff) | |
download | ouroboros-7a6bc98a1ea07991d8ff00a9b77be196bd9cef45.tar.gz ouroboros-7a6bc98a1ea07991d8ff00a9b77be196bd9cef45.zip |
lib: Check rdrbuff sanitize for robust mutexes
The sanitize function in the rdrbuff should only be compiled if robust
mutexes are present on the system.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
-rw-r--r-- | src/lib/shm_rdrbuff.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/shm_rdrbuff.c b/src/lib/shm_rdrbuff.c index 9a003e21..76943989 100644 --- a/src/lib/shm_rdrbuff.c +++ b/src/lib/shm_rdrbuff.c @@ -101,12 +101,14 @@ static void garbage_collect(struct shm_rdrbuff * rdrb) pthread_cond_broadcast(rdrb->healthy); } +#ifdef HAVE_ROBUST_MUTEX static void sanitize(struct shm_rdrbuff * rdrb) { --get_head_ptr(rdrb)->refs; garbage_collect(rdrb); pthread_mutex_consistent(rdrb->lock); } +#endif static char * rdrb_filename(void) { |