summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-01-09 13:59:33 -0500
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-01-09 14:01:31 -0500
commit0bbb9e72f21ec65809b43c56652f6b1fc04a0542 (patch)
tree2b3db0054a07d619c9fc14e3c8c17b6d76e59566
parent4060fcc47b537d49e7801371ddedf9828c94366a (diff)
lib: add MTYPE for synchronization primitives
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
-rw-r--r--lib/frr_pthread.c1
-rw-r--r--lib/frr_pthread.h3
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/frr_pthread.c b/lib/frr_pthread.c
index 19dfbaf54b..de522e5ef9 100644
--- a/lib/frr_pthread.c
+++ b/lib/frr_pthread.c
@@ -26,6 +26,7 @@
#include "hash.h"
DEFINE_MTYPE_STATIC(LIB, FRR_PTHREAD, "FRR POSIX Thread");
+DEFINE_MTYPE(LIB, PTHREAD_PRIM, "POSIX synchronization primitives");
static unsigned int next_id = 0;
diff --git a/lib/frr_pthread.h b/lib/frr_pthread.h
index f6000340a7..7915b43a46 100644
--- a/lib/frr_pthread.h
+++ b/lib/frr_pthread.h
@@ -21,8 +21,11 @@
#define _FRR_PTHREAD_H
#include <pthread.h>
+#include "memory.h"
#include "thread.h"
+DECLARE_MTYPE(PTHREAD_PRIM);
+
struct frr_pthread {
/* pthread id */