Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8bd969fe authored by Trilok Soni's avatar Trilok Soni Committed by Gerrit - the friendly Code Review server
Browse files

arm64: Make GENERIC_ATOMIC64 implementation compile for arm64



GENERIC_ATOMIC64 is a C implementation of the atomic64_xxx APIs.
Enabling this feature requires some modifications in the generic
header files in order to make this feature compile for the arm64
targets.

Change-Id: Id7e55bd355b61e6b29a6622b353045b735fb011e
Signed-off-by: default avatarTrilok Soni <tsoni@codeaurora.org>
parent 3e5d75b2
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -134,6 +134,8 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u)

#define atomic_add_negative(i,v) (atomic_add_return(i, v) < 0)


#ifndef CONFIG_GENERIC_ATOMIC64
/*
 * 64-bit atomic operations.
 */
@@ -252,5 +254,6 @@ static inline int atomic64_add_unless(atomic64_t *v, long a, long u)
#define atomic64_dec_and_test(v)	(atomic64_dec_return((v)) == 0)
#define atomic64_inc_not_zero(v)	atomic64_add_unless((v), 1LL, 0LL)

#endif /*!CONFIG_GENERIC_ATOMIC64*/
#endif
#endif
+3 −0
Original line number Diff line number Diff line
@@ -9,6 +9,9 @@
 */

#include <asm/types.h>
#ifdef CONFIG_GENERIC_ATOMIC64
#include <asm-generic/atomic64.h>
#endif

/*
 * Suppport for atomic_long_t
+1 −1
Original line number Diff line number Diff line
@@ -177,7 +177,7 @@ typedef struct {
	int counter;
} atomic_t;

#ifdef CONFIG_64BIT
#if defined(CONFIG_64BIT) && !defined(CONFIG_GENERIC_ATOMIC64)
typedef struct {
	long counter;
} atomic64_t;