]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/frrcu.h
Merge pull request #10953 from leonshaw/fix/bgp-rm-leak
[mirror_frr.git] / lib / frrcu.h
index 491e89aac24378854a057d350fa3d7203a7929ed..ae840926b559c6064e4457c3f7c5d84db31bc5ae 100644 (file)
 #ifndef _FRRCU_H
 #define _FRRCU_H
 
+#include <assert.h>
+
 #include "memory.h"
 #include "atomlist.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* quick RCU primer:
  *   There's a global sequence counter.  Whenever a thread does a
  *   rcu_read_lock(), it is marked as holding the current sequence counter.
@@ -112,7 +118,7 @@ struct rcu_action {
 };
 
 /* RCU cleanup function queue item */
-PREDECL_ATOMLIST(rcu_heads)
+PREDECL_ATOMLIST(rcu_heads);
 struct rcu_head {
        struct rcu_heads_item head;
        const struct rcu_action *action;
@@ -170,4 +176,8 @@ extern void rcu_enqueue(struct rcu_head *head, const struct rcu_action *action);
 
 extern void rcu_close(struct rcu_head_close *head, int fd);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _FRRCU_H */