summaryrefslogtreecommitdiff
path: root/lib/frratomic.h
AgeCommit message (Collapse)Author
2023-02-09*: auto-convert to SPDX License IDsDavid Lamparter
Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2020-04-21lib/atomlist: make C++ compatibleDavid Lamparter
... by using `atomic_atomptr_t`. Other ideas seemed worse. Signed-off-by: David Lamparter <equinox@diac24.net>
2019-04-18lib: add cmpxchg_strong to frratomic.hDavid Lamparter
Signed-off-by: David Lamparter <equinox@diac24.net>
2019-02-11lib: make atomic ops C++ compatibleDavid Lamparter
C++ doesn't have ISO C11 stdatomic.h or "_Atomic inttype", so use std::atomic instead to get the headers compatible. Signed-off-by: David Lamparter <equinox@diac24.net>
2018-08-29libs: fix missing atomics for some gcc versionsMark Stapp
stdatomic.h does not have aliases for all of the useful gcc atomic primitives; add them in for that path through frratomic.h. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2018-08-28libs: add atomic xxx_and_fetch apisMark Stapp
We have the fetch_and_xxx apis, which return the _old_ value; adding the xxx_and_fetch versions, which return the new value. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2018-02-28lib: add atomic bitwise OR, ANDQuentin Young
* Add support for C11 bitwise OR & AND operations * Add atomic versions of bitfield macros Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-07-17*: reindentreindent-master-afterwhitespace / reindent
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-03-31build: try to find some kind of atomic opsDavid Lamparter
Either one of: - ISO C11 - gcc __atomic_* - gcc/clang __sync_* Signed-off-by: David Lamparter <equinox@opensourcerouting.org>