diff options
| author | vivek <vivek@cumulusnetworks.com> | 2018-03-10 04:03:41 +0000 |
|---|---|---|
| committer | vivek <vivek@cumulusnetworks.com> | 2018-03-10 04:03:41 +0000 |
| commit | 4e262455a252c700f81df75fb8107d112062bba8 (patch) | |
| tree | fbd55c66eebe78ccb60424e560548d1613aa403a /lib/zebra.h | |
| parent | bfd498f0dab9a1937c6036cd35ed020b64a69e8f (diff) | |
| parent | 58e7db106d5907cb129fcc316f02ce0bf34e3885 (diff) | |
Merge branch 'master' of https://github.com/frrouting/frr into evpn-ipv6-tenant-routing
Conflicts:
bgpd/bgp_evpn.c
Diffstat (limited to 'lib/zebra.h')
| -rw-r--r-- | lib/zebra.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/zebra.h b/lib/zebra.h index 11bf764b63..262ad2e43d 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -127,10 +127,10 @@ typedef unsigned char u_int8_t; #endif #ifndef HAVE_LIBCRYPT -# ifdef HAVE_LIBCRYPTO -# include <openssl/des.h> +#ifdef HAVE_LIBCRYPTO +#include <openssl/des.h> # define crypt DES_crypt -# endif +#endif #endif #include "openbsd-tree.h" @@ -481,6 +481,16 @@ typedef enum { #define UNSET_FLAG(V,F) (V) &= ~(F) #define RESET_FLAG(V) (V) = 0 +/* Atomic flag manipulation macros. */ +#define CHECK_FLAG_ATOMIC(PV, F) \ + ((atomic_load_explicit(PV, memory_order_seq_cst)) & (F)) +#define SET_FLAG_ATOMIC(PV, F) \ + ((atomic_fetch_or_explicit(PV, (F), memory_order_seq_cst))) +#define UNSET_FLAG_ATOMIC(PV, F) \ + ((atomic_fetch_and_explicit(PV, ~(F), memory_order_seq_cst))) +#define RESET_FLAG_ATOMIC(PV) \ + ((atomic_store_explicit(PV, 0, memory_order_seq_cst))) + /* Zebra types. Used in Zserv message header. */ typedef u_int16_t zebra_size_t; typedef u_int16_t zebra_command_t; |
