diff --git a/src/cairo-atomic-private.h b/src/cairo-atomic-private.h index 7fbdedb2b..a0ca76908 100644 --- a/src/cairo-atomic-private.h +++ b/src/cairo-atomic-private.h @@ -58,7 +58,6 @@ CAIRO_BEGIN_DECLS typedef int cairo_atomic_int_t; # define _cairo_atomic_int_get(x) (*x) -# define _cairo_atomic_int_set(x, value) ((*x) = value) # define _cairo_atomic_int_inc(x) ((void) __sync_fetch_and_add(x, 1)) # define _cairo_atomic_int_dec_and_test(x) (__sync_fetch_and_add(x, -1) == 1) @@ -87,7 +86,6 @@ typedef long long cairo_atomic_intptr_t; typedef AO_t cairo_atomic_int_t; # define _cairo_atomic_int_get(x) (AO_load_full (x)) -# define _cairo_atomic_int_set(x, value) (AO_store_full (x)) # define _cairo_atomic_int_inc(x) ((void) AO_fetch_and_add1_full(x)) # define _cairo_atomic_int_dec_and_test(x) (AO_fetch_and_sub1_full(x) == 1) @@ -126,18 +124,10 @@ cairo_private void * _cairo_atomic_ptr_cmpxchg (void **x, void *oldv, void *newv); #ifdef ATOMIC_OP_NEEDS_MEMORY_BARRIER - cairo_private int _cairo_atomic_int_get (int *x); - -cairo_private void -_cairo_atomic_int_set (int *x, int value); - #else - # define _cairo_atomic_int_get(x) (*x) -# define _cairo_atomic_int_set(x, value) ((*x) = value) - #endif #endif diff --git a/src/cairo-atomic.c b/src/cairo-atomic.c index 5bc7d3a1e..60d8f0021 100644 --- a/src/cairo-atomic.c +++ b/src/cairo-atomic.c @@ -101,14 +101,6 @@ _cairo_atomic_int_get (int *x) return ret; } - -void -_cairo_atomic_int_set (int *x, int value) -{ - CAIRO_MUTEX_LOCK (_cairo_atomic_mutex); - *x = value; - CAIRO_MUTEX_UNLOCK (_cairo_atomic_mutex); -} #endif #endif diff --git a/src/cairo-reference-count-private.h b/src/cairo-reference-count-private.h index 7c5c60101..0cb5695dd 100644 --- a/src/cairo-reference-count-private.h +++ b/src/cairo-reference-count-private.h @@ -50,7 +50,6 @@ typedef struct { #define CAIRO_REFERENCE_COUNT_INIT(RC, VALUE) ((RC)->ref_count = (VALUE)) #define CAIRO_REFERENCE_COUNT_GET_VALUE(RC) _cairo_atomic_int_get (&(RC)->ref_count) -#define CAIRO_REFERENCE_COUNT_SET_VALUE(RC, VALUE) _cairo_atomic_int_set (&(RC)->ref_count, (VALUE)) #define CAIRO_REFERENCE_COUNT_INVALID_VALUE ((cairo_atomic_int_t) -1) #define CAIRO_REFERENCE_COUNT_INVALID {CAIRO_REFERENCE_COUNT_INVALID_VALUE}