Commit 5ebf1b14 authored by Charlène's avatar Charlène
Browse files

powerpc32: use fallback code for 64 bits __sync primitives

parent e2efb169
......@@ -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
{
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment