summaryrefslogtreecommitdiff
path: root/bgpd/bgp_io.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-01-06 14:04:35 -0500
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-01-06 14:09:29 -0500
commit88b24dee19fcf88ed32d5574e4f45c005f66a642 (patch)
tree4b3e9a0d3956f9b431985d83dceb22ffb320455a /bgpd/bgp_io.h
parentb2140cb7c8620d51f55942d349612129f51d6552 (diff)
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 c4bd3c2dd9..73587366d7 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