diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2022-08-04 07:36:51 -0400 | 
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2022-08-05 07:51:27 -0400 | 
| commit | 0a5f9773a8b02e56af6232348fd2595e5300fc92 (patch) | |
| tree | 1a783680095ad85749b76be373e399f324ab15a8 /zebra/zebra_router.h | |
| parent | d5795103bc1dc4aada29b1ae7a052a97e07eb8bc (diff) | |
zebra: zrouter.in_shutdown is an atomic variable
So let's treat the variable like it is atomic and
properly load it when we need to look at it.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/zebra_router.h')
| -rw-r--r-- | zebra/zebra_router.h | 5 | 
1 files changed, 5 insertions, 0 deletions
diff --git a/zebra/zebra_router.h b/zebra/zebra_router.h index 0e2725c977..992bcd5c08 100644 --- a/zebra/zebra_router.h +++ b/zebra/zebra_router.h @@ -285,6 +285,11 @@ static inline void zebra_router_set_supports_nhgs(bool support)  	zrouter.supports_nhgs = support;  } +static inline bool zebra_router_in_shutdown(void) +{ +	return atomic_load_explicit(&zrouter.in_shutdown, memory_order_relaxed); +} +  /* zebra_northbound.c */  extern const struct frr_yang_module_info frr_zebra_info;  | 
