From 13d0f8c3d3e6376b280c6b690766c5c216108095 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 31 Mar 2019 15:13:29 +0200 Subject: [PATCH] disable slotmap debugging Change-Id: I7f672adc1fef6616d7244f73214273236b42a0ca --- src/slotmap.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/slotmap.h b/src/slotmap.h index 78dfff9..bf18e04 100644 --- a/src/slotmap.h +++ b/src/slotmap.h @@ -86,6 +86,7 @@ void _slotmap_del(struct slotmaps *maps, struct slot_mapping *map); /* initialize the entire map collection */ struct slotmaps *slotmap_init(void *ctx); +#ifdef SLOTMAP_DEBUG #define slotmaps_rdlock(maps) do { \ printf("%s:%u = slotmap_rdlock()\n", __FILE__, __LINE__); \ pthread_rwlock_rdlock(&(maps)->rwlock); \ @@ -100,6 +101,11 @@ struct slotmaps *slotmap_init(void *ctx); printf("%s:%u = slotmap_unlock()\n", __FILE__, __LINE__); \ pthread_rwlock_unlock(&(maps)->rwlock); \ } while (0) +#else +#define slotmaps_rdlock(maps) pthread_rwlock_rdlock(&(maps)->rwlock) +#define slotmaps_wrlock(maps) pthread_rwlock_wrlock(&(maps)->rwlock) +#define slotmaps_unlock(maps) pthread_rwlock_unlock(&(maps)->rwlock) +#endif #ifdef REMSIM_SERVER