Atomic increment and get?
rysto32 at gmail.com
Mon Oct 3 14:59:49 UTC 2011
2011/10/3 Lev Serebryakov <lev at freebsd.org>:
> Hello, Hackers.
> Is here atomic increment and get (or add and get) operation in
> kernel? I cannot find one. Here is atomic_add_32(), but it doesn't
> return result. And here is no atomic_add_64() on 32 bit system :(
man atomic gives all of the atomic primitives provided in the kernel.
In this case you want atomic_fetchadd_X.
More information about the freebsd-hackers