mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-06-09 23:36:03 +09:00
atomic-long: Fix warnings on arm64
Several inline functions in this file reference undefined functions in U-Boot. For example: atomic-long.h:73:9: warning: implicit declaration of function 'atomic64_sub_and_test' atomic-long.h:80:9: warning: implicit declaration of function 'atomic64_dec_and_test' atomic-long.h:87:9: warning: implicit declaration of function 'atomic64_inc_and_test' Handle this the same as the 32 bit build by wrapping these functions in a __UBOOT__ check. Signed-off-by: Bradley Bolen <bradleybolen@gmail.com>
This commit is contained in:
parent
2d58dddf7a
commit
9c3264ce40
|
@ -66,6 +66,7 @@ static inline void atomic_long_sub(long i, atomic_long_t *l)
|
||||||
atomic64_sub(i, v);
|
atomic64_sub(i, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef __UBOOT__
|
||||||
static inline int atomic_long_sub_and_test(long i, atomic_long_t *l)
|
static inline int atomic_long_sub_and_test(long i, atomic_long_t *l)
|
||||||
{
|
{
|
||||||
atomic64_t *v = (atomic64_t *)l;
|
atomic64_t *v = (atomic64_t *)l;
|
||||||
|
@ -135,6 +136,7 @@ static inline long atomic_long_add_unless(atomic_long_t *l, long a, long u)
|
||||||
(atomic64_cmpxchg((atomic64_t *)(l), (old), (new)))
|
(atomic64_cmpxchg((atomic64_t *)(l), (old), (new)))
|
||||||
#define atomic_long_xchg(v, new) \
|
#define atomic_long_xchg(v, new) \
|
||||||
(atomic64_xchg((atomic64_t *)(v), (new)))
|
(atomic64_xchg((atomic64_t *)(v), (new)))
|
||||||
|
#endif /* __UBOOT__ */
|
||||||
|
|
||||||
#else /* BITS_PER_LONG == 64 */
|
#else /* BITS_PER_LONG == 64 */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user