From f668407b30868ef137016b70011ce888e7950d4e Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 24 Apr 2012 18:06:44 +0200 Subject: Fix atomics on SPARC Inspired by https://bugreports.qt-project.org/secure/attachment/26020/qt_atomic_sparc64.patch Task-number: QTBUG-22479 Change-Id: Ie3275df96c639d6a75e05f70fe5745aeb34457f9 Reviewed-by: Bradley T. Hughes (cherry-picked from commit 01ee0985319a0f41be12c3c8ff3813a74b43835e) --- src/corelib/arch/qatomic_sparc.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/corelib/arch/qatomic_sparc.h b/src/corelib/arch/qatomic_sparc.h index feb172e..e478765 100644 --- a/src/corelib/arch/qatomic_sparc.h +++ b/src/corelib/arch/qatomic_sparc.h @@ -127,17 +127,17 @@ extern "C" { Q_CORE_EXPORT int q_atomic_fetch_and_add_acquire_int(volatile int *ptr, int value); Q_CORE_EXPORT int q_atomic_fetch_and_add_release_int(volatile int *ptr, int value); - Q_CORE_EXPORT int q_atomic_test_and_set_ptr(volatile void *ptr, void *expected, void *newval); + Q_CORE_EXPORT int q_atomic_test_and_set_ptr(volatile void *ptr, const void *expected, const void *newval); Q_CORE_EXPORT int q_atomic_test_and_set_acquire_ptr(volatile void *ptr, - void *expected, - void *newval); + const void *expected, + const void *newval); Q_CORE_EXPORT int q_atomic_test_and_set_release_ptr(volatile void *ptr, - void *expected, - void *newval); + const void *expected, + const void *newval); - Q_CORE_EXPORT void *q_atomic_set_ptr(volatile void *ptr, void *newval); - Q_CORE_EXPORT void *q_atomic_fetch_and_store_acquire_ptr(volatile void *ptr, void *newval); - Q_CORE_EXPORT void *q_atomic_fetch_and_store_release_ptr(volatile void *ptr, void *newval); + Q_CORE_EXPORT void *q_atomic_set_ptr(volatile void *ptr, const void *newval); + Q_CORE_EXPORT void *q_atomic_fetch_and_store_acquire_ptr(volatile void *ptr, const void *newval); + Q_CORE_EXPORT void *q_atomic_fetch_and_store_release_ptr(volatile void *ptr, const void *newval); Q_CORE_EXPORT void *q_atomic_fetch_and_add_ptr(volatile void *ptr, int value); Q_CORE_EXPORT void *q_atomic_fetch_and_add_acquire_ptr(volatile void *ptr, int value); -- cgit v0.12