diff options
author | Karolina Drobnik <karolinadrobnik@gmail.com> | 2022-02-02 14:03:03 +0300 |
---|---|---|
committer | Mike Rapoport <rppt@linux.ibm.com> | 2022-02-20 09:44:37 +0300 |
commit | 9c07af207c65e6fa8063d1105356568d8b03c536 (patch) | |
tree | 00b85e7eeb71b4248f9a4d00ca4b84712b00dfdf | |
parent | 5cf67a6051ea2558fd7c3d39c5a808db73073e9d (diff) | |
download | linux-9c07af207c65e6fa8063d1105356568d8b03c536.tar.xz |
tools/include: Update atomic definitions
Add atomic_long_set function to atomic.h and atomic_long_t type to
types.h so they can be used in testing.
Signed-off-by: Karolina Drobnik <karolinadrobnik@gmail.com>
Signed-off-by: Mike Rapoport <rppt@kernel.org>
Link: https://lore.kernel.org/r/082fde69debc36bfc56cdb413d847dcd6b1e36dd.1643796665.git.karolinadrobnik@gmail.com
-rw-r--r-- | tools/include/linux/atomic.h | 2 | ||||
-rw-r--r-- | tools/include/linux/types.h | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/tools/include/linux/atomic.h b/tools/include/linux/atomic.h index 00a6c4ca562b..01907b33537e 100644 --- a/tools/include/linux/atomic.h +++ b/tools/include/linux/atomic.h @@ -4,6 +4,8 @@ #include <asm/atomic.h> +void atomic_long_set(atomic_long_t *v, long i); + /* atomic_cmpxchg_relaxed */ #ifndef atomic_cmpxchg_relaxed #define atomic_cmpxchg_relaxed atomic_cmpxchg diff --git a/tools/include/linux/types.h b/tools/include/linux/types.h index 35cedaf191e8..5908e58c3598 100644 --- a/tools/include/linux/types.h +++ b/tools/include/linux/types.h @@ -74,6 +74,10 @@ typedef struct { int counter; } atomic_t; +typedef struct { + long counter; +} atomic_long_t; + #ifndef __aligned_u64 # define __aligned_u64 __u64 __attribute__((aligned(8))) #endif |