atomic: Remove unused function _cairo_atomic_int_set()

_cairo_atomic_int_set() was only used in the definition of
CAIRO_REFERENCE_SET_VALUE, which was never used.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Andrea Canciani 2010-04-28 15:29:32 +02:00
parent 9ce8bef9d6
commit a0bf424b82
3 changed files with 0 additions and 19 deletions

View file

@ -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

View file

@ -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

View file

@ -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}