Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Karolina Drobnik and committed by
Mike Rapoport
9c07af20 5cf67a60

+6
+2
tools/include/linux/atomic.h
··· 4 4 5 5 #include <asm/atomic.h> 6 6 7 + void atomic_long_set(atomic_long_t *v, long i); 8 + 7 9 /* atomic_cmpxchg_relaxed */ 8 10 #ifndef atomic_cmpxchg_relaxed 9 11 #define atomic_cmpxchg_relaxed atomic_cmpxchg
+4
tools/include/linux/types.h
··· 74 74 int counter; 75 75 } atomic_t; 76 76 77 + typedef struct { 78 + long counter; 79 + } atomic_long_t; 80 + 77 81 #ifndef __aligned_u64 78 82 # define __aligned_u64 __u64 __attribute__((aligned(8))) 79 83 #endif