summaryrefslogtreecommitdiff
path: root/lib/debug.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-05-24 20:09:01 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-05-28 17:07:04 -0400
commitf756a869aeefec55c31d54e1dff4b9c116532512 (patch)
tree982df68b1d6e8eac843273f3812a413b012ed14e /lib/debug.h
parentdcdc27095a2e2d26a62ffed85c9c6231ee954bed (diff)
lib: Make the debug callbacks a list of callbacks
Allow multiple callers to initialize themselves to receive callbacks for debug on/off operations. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib/debug.h')
-rw-r--r--lib/debug.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/debug.h b/lib/debug.h
index ace060d057..0ee5963ec6 100644
--- a/lib/debug.h
+++ b/lib/debug.h
@@ -84,6 +84,7 @@ struct debug {
const char *desc;
};
+PREDECL_LIST(debug_cb_list)
/*
* Callback set for debugging code.
*
@@ -93,6 +94,11 @@ struct debug {
*/
struct debug_callbacks {
/*
+ * Linked list of Callbacks to call
+ */
+ struct debug_cb_list_item item;
+
+ /*
* flags
* flags to set on debug flag fields
*
@@ -233,7 +239,7 @@ struct debug_callbacks {
*
* MT-Safe
*/
-void debug_init(const struct debug_callbacks *cb);
+void debug_init(struct debug_callbacks *cb);
#ifdef __cplusplus
}