]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
atomic: convert to uatomic
authorDave Chinner <dchinner@redhat.com>
Wed, 29 Sep 2021 20:57:02 +0000 (16:57 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 29 Sep 2021 20:57:02 +0000 (16:57 -0400)
commitde555f66fc47365d14fa499d462f31bff18f81a8
treebde59900d67b18547da06525d2618f3d1ec2ae27
parent686bddf9424ca15d49252f4de6935067c67ab142
atomic: convert to uatomic

Now we have liburcu, we can make use of it's atomic variable
implementation. It is almost identical to the kernel API - it's just
got a "uatomic" prefix. liburcu also provides all the same aomtic
variable memory barriers as the kernel, so if we pull memory barrier
dependent kernel code across, it will just work with the right
barrier wrappers.

This is preparation the addition of more extensive atomic operations
the that kernel buffer cache requires to function correctly.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
[chandan.babu@oracle.com: Swap order of arguments provided to atomic[64]_[add|sub]()]
Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>
[sandeen: fix whitespace]
[sandeen: make #defines a little more consistent about (a,v)]
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
include/atomic.h