summaryrefslogtreecommitdiff
path: root/lib/thread.h
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2017-03-08 23:16:15 +0000
committerQuentin Young <qlyoung@cumulusnetworks.com>2017-11-30 16:17:57 -0500
commit2d4ee77490a1a0b93b5e6945af2210bb0836baa1 (patch)
tree090f28aedcd7b38bfdbe3899891cf13644589860 /lib/thread.h
parent03014d48f4afe83f3bf87c966bcccc8c7532d791 (diff)
lib, bgpd: implement pthread lifecycle management
Removes the WiP shim and implements proper thread lifecycle management. * Declare necessary pthread_t's in bgp_master * Define new MTYPE in lib/thread.c for pthreads * Allocate and free BGP's pthreads appropriately * Terminate and join threads appropriately Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/thread.h')
-rw-r--r--lib/thread.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/thread.h b/lib/thread.h
index c830446e10..1cf19d987f 100644
--- a/lib/thread.h
+++ b/lib/thread.h
@@ -26,6 +26,9 @@
#include <poll.h>
#include "monotime.h"
+#include "memory.h"
+DECLARE_MTYPE(PTHREAD)
+
struct rusage_t {
struct rusage cpu;
struct timeval real;