diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-02-13 12:47:23 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-13 12:47:23 -0500 |
| commit | cfef27e56ef3246a261ee0bf2810a46c08eebf8f (patch) | |
| tree | ac66ba3d1f7a037ad51f21bd54a236d5388f5916 /lib/frr_pthread.h | |
| parent | 01490ba25da576ec0a72c896559ebc6fa71484be (diff) | |
| parent | 8ed561e1f13d0afb019a7963238bdd43ad017bec (diff) | |
Merge pull request #3622 from mjstapp/fix_cpp_compile
libs, daemons: changes to permit c++ compilation
Diffstat (limited to 'lib/frr_pthread.h')
| -rw-r--r-- | lib/frr_pthread.h | 10 |
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 */ |
