summaryrefslogtreecommitdiff
path: root/lib/frr_pthread.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/frr_pthread.h')
-rw-r--r--lib/frr_pthread.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/frr_pthread.h b/lib/frr_pthread.h
index e6b3f031b3..9bc7b94033 100644
--- a/lib/frr_pthread.h
+++ b/lib/frr_pthread.h
@@ -25,6 +25,10 @@
#include "memory.h"
#include "thread.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
DECLARE_MTYPE(FRR_PTHREAD);
DECLARE_MTYPE(PTHREAD_PRIM);
@@ -73,7 +77,7 @@ struct frr_pthread {
*/
pthread_cond_t *running_cond;
pthread_mutex_t *running_cond_mtx;
- _Atomic bool running;
+ atomic_bool running;
/*
* Fake thread-specific storage. No constraints on usage. Helpful when
@@ -211,4 +215,8 @@ void frr_pthread_stop_all(void);
#define pthread_condattr_setclock(A, B)
#endif
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _FRR_PTHREAD_H */