Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | From c9859a38a58996b8767a30e14febc03845f66f95 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sat, 1 Jul 2017 13:10:53 -0700 |
| 4 | Subject: [PATCH] Define 64bit atomic helpers for ppc 32-bit |
| 5 | |
| 6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 7 | --- |
| 8 | src/atomic64.c | 4 ++-- |
| 9 | 1 file changed, 2 insertions(+), 2 deletions(-) |
| 10 | |
| 11 | diff --git a/src/atomic64.c b/src/atomic64.c |
| 12 | index f841b39b..35c7c9d8 100644 |
| 13 | --- a/src/atomic64.c |
| 14 | +++ b/src/atomic64.c |
| 15 | @@ -18,10 +18,10 @@ |
| 16 | #include <stdbool.h> |
| 17 | |
| 18 | /* |
| 19 | - * only need these on MIPS, since it lacks hardware 64-bit atomics, |
| 20 | + * only need these on MIPS & PPC32, since it lacks hardware 64-bit atomics, |
| 21 | * unlike x86 and ARM. |
| 22 | */ |
| 23 | -#if defined(__mips__) || defined(__mipsel__) |
| 24 | +#if defined(__mips__) || defined(__mipsel__) || defined(__powerpc__) |
| 25 | |
| 26 | static void __spin_lock(volatile int *lock) { |
| 27 | while (__sync_lock_test_and_set(lock, 1)) |
| 28 | -- |
| 29 | 2.13.2 |
| 30 | |