Remove unused hb_atomic_int_set()
Apparently it can't be implemented on OS X. We weren't using it anyway.
This commit is contained in:
parent
45227c10e4
commit
8004429102
@ -60,7 +60,6 @@ typedef volatile int hb_atomic_int_t;
|
|||||||
#define hb_atomic_int_add(AI, V) g_atomic_int_exchange_and_add (&(AI), V)
|
#define hb_atomic_int_add(AI, V) g_atomic_int_exchange_and_add (&(AI), V)
|
||||||
#endif
|
#endif
|
||||||
#define hb_atomic_int_get(AI) g_atomic_int_get (&(AI))
|
#define hb_atomic_int_get(AI) g_atomic_int_get (&(AI))
|
||||||
#define hb_atomic_int_set(AI, V) g_atomic_int_set (&(AI), V)
|
|
||||||
|
|
||||||
|
|
||||||
#elif !defined(HB_NO_MT) && defined(_MSC_VER) && _MSC_VER >= 1600
|
#elif !defined(HB_NO_MT) && defined(_MSC_VER) && _MSC_VER >= 1600
|
||||||
@ -70,7 +69,6 @@ typedef volatile int hb_atomic_int_t;
|
|||||||
typedef long hb_atomic_int_t;
|
typedef long hb_atomic_int_t;
|
||||||
#define hb_atomic_int_add(AI, V) _InterlockedExchangeAdd (&(AI), V)
|
#define hb_atomic_int_add(AI, V) _InterlockedExchangeAdd (&(AI), V)
|
||||||
#define hb_atomic_int_get(AI) (_ReadBarrier (), (AI))
|
#define hb_atomic_int_get(AI) (_ReadBarrier (), (AI))
|
||||||
#define hb_atomic_int_set(AI, V) ((void) _InterlockedExchange (&(AI), (V)))
|
|
||||||
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
@ -80,7 +78,6 @@ typedef long hb_atomic_int_t;
|
|||||||
typedef volatile int hb_atomic_int_t;
|
typedef volatile int hb_atomic_int_t;
|
||||||
#define hb_atomic_int_add(AI, V) ((AI) += (V), (AI) - (V))
|
#define hb_atomic_int_add(AI, V) ((AI) += (V), (AI) - (V))
|
||||||
#define hb_atomic_int_get(AI) (AI)
|
#define hb_atomic_int_get(AI) (AI)
|
||||||
#define hb_atomic_int_set(AI, V) ((void) ((AI) = (V)))
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -98,7 +95,6 @@ typedef struct {
|
|||||||
inline void init (int v) { ref_count = v; /* non-atomic is fine */ }
|
inline void init (int v) { ref_count = v; /* non-atomic is fine */ }
|
||||||
inline int inc (void) { return hb_atomic_int_add (ref_count, 1); }
|
inline int inc (void) { return hb_atomic_int_add (ref_count, 1); }
|
||||||
inline int dec (void) { return hb_atomic_int_add (ref_count, -1); }
|
inline int dec (void) { return hb_atomic_int_add (ref_count, -1); }
|
||||||
inline void set (int v) { hb_atomic_int_set (ref_count, v); }
|
|
||||||
|
|
||||||
inline int get (void) const { return hb_atomic_int_get (ref_count); }
|
inline int get (void) const { return hb_atomic_int_get (ref_count); }
|
||||||
inline bool is_invalid (void) const { return get () == HB_REFERENCE_COUNT_INVALID_VALUE; }
|
inline bool is_invalid (void) const { return get () == HB_REFERENCE_COUNT_INVALID_VALUE; }
|
||||||
|
Loading…
Reference in New Issue
Block a user