#ifndef _FCATOMIC_H_
#define _FCATOMIC_H_
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#if 0
typedef <type> fc_atomic_int_t;
#define FC_ATOMIC_INT_FORMAT …
#define fc_atomic_int_add …
#define fc_atomic_ptr_get …
#define fc_atomic_ptr_cmpexch …
#elif !defined(FC_NO_MT) && defined(HAVE_STDATOMIC_PRIMITIVES)
#include <stdatomic.h>
fc_atomic_int_t;
#define FC_ATOMIC_INT_FORMAT …
#define fc_atomic_int_add(AI, V) …
#define fc_atomic_ptr_get(P) …
static inline FcBool _fc_atomic_ptr_cmpexch(_Atomic(void *)*P, void * O, _Atomic(void *) N) { … }
#define fc_atomic_ptr_cmpexch(P,O,N) …
#define FC_REF_CONSTANT_VALUE …
#elif !defined(FC_NO_MT) && defined(_MSC_VER) || defined(__MINGW32__)
#include "fcwindows.h"
typedef LONG fc_atomic_int_t;
#define FC_ATOMIC_INT_FORMAT …
#define fc_atomic_int_add …
#define fc_atomic_ptr_get …
#define fc_atomic_ptr_cmpexch …
#elif !defined(FC_NO_MT) && defined(__APPLE__)
#include <libkern/OSAtomic.h>
#include <AvailabilityMacros.h>
typedef int fc_atomic_int_t;
#define FC_ATOMIC_INT_FORMAT …
#define fc_atomic_int_add …
#if SIZEOF_VOID_P == 8
#define fc_atomic_ptr_get …
#elif SIZEOF_VOID_P == 4
#define fc_atomic_ptr_get …
#else
#error "SIZEOF_VOID_P not 4 or 8 (assumes CHAR_BIT is 8)"
#endif
#if (MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 || __IPHONE_OS_VERSION_MIN_REQUIRED >= 20100)
#define fc_atomic_ptr_cmpexch …
#else
#if __LP64__
#define fc_atomic_ptr_cmpexch …
#else
#define fc_atomic_ptr_cmpexch …
#endif
#endif
#elif !defined(FC_NO_MT) && defined(HAVE_INTEL_ATOMIC_PRIMITIVES)
typedef int fc_atomic_int_t;
#define FC_ATOMIC_INT_FORMAT …
#define fc_atomic_int_add …
#define fc_atomic_ptr_get …
#define fc_atomic_ptr_cmpexch …
#elif !defined(FC_NO_MT) && defined(HAVE_SOLARIS_ATOMIC_OPS)
#include <atomic.h>
#include <mbarrier.h>
typedef unsigned int fc_atomic_int_t;
#define FC_ATOMIC_INT_FORMAT …
#define fc_atomic_int_add …
#define fc_atomic_ptr_get …
#define fc_atomic_ptr_cmpexch …
#elif !defined(FC_NO_MT)
#define FC_ATOMIC_INT_NIL …
typedef volatile int fc_atomic_int_t;
#define FC_ATOMIC_INT_FORMAT …
#define fc_atomic_int_add …
#define fc_atomic_ptr_get …
#define fc_atomic_ptr_cmpexch …
#else
typedef int fc_atomic_int_t;
#define FC_ATOMIC_INT_FORMAT …
#define fc_atomic_int_add …
#define fc_atomic_ptr_get …
#define fc_atomic_ptr_cmpexch …
#endif
#ifndef FC_REF_CONSTANT_VALUE
#define FC_REF_CONSTANT_VALUE …
#endif
#define FC_REF_CONSTANT …
FcRef;
static inline void FcRefInit (FcRef *r, int v) { … }
static inline int FcRefInc (FcRef *r) { … }
static inline int FcRefDec (FcRef *r) { … }
static inline int FcRefAdd (FcRef *r, int v) { … }
static inline void FcRefSetConst (FcRef *r) { … }
static inline FcBool FcRefIsConst (const FcRef *r) { … }
#endif