mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 11:15:47 +00:00
Merge pull request #6575 from mjstapp/fix_avoid_clang_add_fetch
zebra: avoid an atomic builtin that clang doesn't like
This commit is contained in:
commit
26a7e0ceda
@ -2158,17 +2158,12 @@ static int dplane_update_enqueue(struct zebra_dplane_ctx *ctx)
|
||||
}
|
||||
DPLANE_UNLOCK();
|
||||
|
||||
curr = atomic_add_fetch_explicit(
|
||||
#ifdef __clang__
|
||||
/* TODO -- issue with the clang atomic/intrinsics currently;
|
||||
* casting away the 'Atomic'-ness of the variable works.
|
||||
*/
|
||||
(uint32_t *)&(zdplane_info.dg_routes_queued),
|
||||
#else
|
||||
curr = atomic_fetch_add_explicit(
|
||||
&(zdplane_info.dg_routes_queued),
|
||||
#endif
|
||||
1, memory_order_seq_cst);
|
||||
|
||||
curr++; /* We got the pre-incremented value */
|
||||
|
||||
/* Maybe update high-water counter also */
|
||||
high = atomic_load_explicit(&zdplane_info.dg_routes_queued_max,
|
||||
memory_order_seq_cst);
|
||||
|
Loading…
Reference in New Issue
Block a user