summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_io.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-01-06 20:04:35 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-01-06 20:09:29 +0100
commit88b24dee19fcf88ed32d5574e4f45c005f66a642 (patch)
tree4b3e9a0d3956f9b431985d83dceb22ffb320455a /bgpd/bgp_io.h
parentlib: Add pthread_yield (diff)
downloadfrr-88b24dee19fcf88ed32d5574e4f45c005f66a642.tar.xz
frr-88b24dee19fcf88ed32d5574e4f45c005f66a642.zip
bgpd: Ensure that io thread is running after start
The BGP IO thread must be running before other threads can start using it. So at startup check to see that it running once, instead of before every function call into. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_io.h')
-rw-r--r--bgpd/bgp_io.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/bgpd/bgp_io.h b/bgpd/bgp_io.h
index c4bd3c2dd..73587366d 100644
--- a/bgpd/bgp_io.h
+++ b/bgpd/bgp_io.h
@@ -37,6 +37,16 @@
extern void bgp_io_init(void);
/**
+ * Ensure that the BGP IO thread is actually up and running
+ *
+ * This function must be called immediately after the thread
+ * has been created for running. This is because we want
+ * to make sure that the io thread is ready before other
+ * threads start attempting to use it.
+ */
+extern void bgp_io_running(void);
+
+/**
* Start function for write thread.
*
* @param arg - unused