[libdazzle/cherry-pick-2f39804e] Merge branch 'master' into 'master'
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle/cherry-pick-2f39804e] Merge branch 'master' into 'master'
- Date: Fri, 12 Jun 2020 15:53:37 +0000 (UTC)
commit 656553862dd71ba156c5a44648df98bb084c8449
Author: Christian Hergert <christian hergert me>
Date: Fri Jun 12 15:52:58 2020 +0000
Merge branch 'master' into 'master'
powerpc32: use fallback code for 64 bits __sync primitives
See merge request GNOME/libdazzle!44
(cherry picked from commit 2f39804e302912a919a2c84c6f10e97b244d77e4)
5ebf1b14 powerpc32: use fallback code for 64 bits __sync primitives
src/util/dzl-counter.c | 4 ++++
src/util/dzl-counter.h | 3 +++
2 files changed, 7 insertions(+)
---
diff --git a/src/util/dzl-counter.c b/src/util/dzl-counter.c
index 472e7fc..3cec2f4 100644
--- a/src/util/dzl-counter.c
+++ b/src/util/dzl-counter.c
@@ -52,7 +52,11 @@ G_DEFINE_BOXED_TYPE (DzlCounterArena, dzl_counter_arena, dzl_counter_arena_ref,
#define CELLS_PER_GROUP(ncpu) \
(((sizeof (CounterInfo) * COUNTERS_PER_GROUP) + \
(sizeof(DzlCounterValue) * (ncpu))) / DATA_CELL_SIZE)
+#ifdef DZL_COUNTER_REQUIRES_ATOMIC
#define DZL_MEMORY_BARRIER __sync_synchronize()
+#else
+#define DZL_MEMORY_BARRIER 0
+#endif
typedef struct
{
diff --git a/src/util/dzl-counter.h b/src/util/dzl-counter.h
index 498b937..542f9a8 100644
--- a/src/util/dzl-counter.h
+++ b/src/util/dzl-counter.h
@@ -163,6 +163,9 @@ G_BEGIN_DECLS
# define dzl_get_current_cpu() dzl_get_current_cpu_rdtscp()
#elif defined(__linux__)
# define dzl_get_current_cpu() dzl_get_current_cpu_call()
+#elif defined(__powerpc__) && !defined(__powerpc64__)
+# define dzl_get_current_cpu() 0
+# undef DZL_COUNTER_REQUIRES_ATOMIC
#else
# define dzl_get_current_cpu() 0
# define DZL_COUNTER_REQUIRES_ATOMIC 1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]