summaryrefslogtreecommitdiffstats
path: root/lib/frratomic.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* lib/atomlist: make C++ compatibleDavid Lamparter2020-04-211-0/+2
| | | | | | ... by using `atomic_atomptr_t`. Other ideas seemed worse. Signed-off-by: David Lamparter <equinox@diac24.net>
* lib: add cmpxchg_strong to frratomic.hDavid Lamparter2019-04-181-1/+6
| | | | Signed-off-by: David Lamparter <equinox@diac24.net>
* lib: make atomic ops C++ compatibleDavid Lamparter2019-02-111-1/+30
| | | | | | | 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>
* libs: fix missing atomics for some gcc versionsMark Stapp2018-08-291-0/+6
| | | | | | | | 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>
* libs: add atomic xxx_and_fetch apisMark Stapp2018-08-281-0/+36
| | | | | | | 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>
* lib: add atomic bitwise OR, ANDQuentin Young2018-02-281-0/+16
| | | | | | | * Add support for C11 bitwise OR & AND operations * Add atomic versions of bitfield macros Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: reindentreindent-master-afterwhitespace / reindent2017-07-171-40/+65
| | | | | | indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: try to find some kind of atomic opsDavid Lamparter2017-03-311-0/+118
Either one of: - ISO C11 - gcc __atomic_* - gcc/clang __sync_* Signed-off-by: David Lamparter <equinox@opensourcerouting.org>