refcount.h

Includes

#include <stdlib.h>
#include <stdint.h>
#include "azure_c_shared_utility/gballoc.h"
#include "azure_macro_utils/macro_utils.h"
#include "refcount_os.h"

Detailed Description

Macro definitions

REFCOUNT_TYPE

#define REFCOUNT_TYPE  struct MU_C2(MU_C2(REFCOUNT_, type), _TAG) 

REFCOUNT_SHORT_TYPE

#define REFCOUNT_SHORT_TYPE  MU_C2(REFCOUNT_, type) 

REFCOUNT_TYPE_DECLARE_CREATE

#define REFCOUNT_TYPE_DECLARE_CREATE        REFCOUNT_SHORT_TYPE 

REFCOUNT_TYPE_DECLARE_CREATE_WITH_EXTRA_SIZE

#define REFCOUNT_TYPE_DECLARE_CREATE_WITH_EXTRA_SIZE        REFCOUNT_SHORT_TYPE 

REFCOUNT_TYPE_CREATE

#define REFCOUNT_TYPE_CREATE        REFCOUNT_SHORT_TYPE 

REFCOUNT_TYPE_CREATE_WITH_EXTRA_SIZE

#define REFCOUNT_TYPE_CREATE_WITH_EXTRA_SIZE        REFCOUNT_SHORT_TYPE 

REFCOUNT_TYPE_DECLARE_DESTROY

#define REFCOUNT_TYPE_DECLARE_DESTROY        REFCOUNT_SHORT_TYPE 

REFCOUNT_TYPE_DESTROY

#define REFCOUNT_TYPE_DESTROY        REFCOUNT_SHORT_TYPE 

DEFINE_CREATE_WITH_EXTRA_SIZE

#define DEFINE_CREATE_WITH_EXTRA_SIZE \
        REFCOUNT_TYPE_DECLARE_CREATE_WITH_EXTRA_SIZE, \
        REFCOUNT_TYPE, \
        REFCOUNT_TYPE, \
        REFCOUNT_TYPE, \
        INIT_REF 

DEFINE_CREATE

#define DEFINE_CREATE \
        REFCOUNT_TYPE_DECLARE_CREATE, \
        REFCOUNT_TYPE_DECLARE_CREATE_WITH_EXTRA_SIZE 

DEFINE_DESTROY

#define DEFINE_DESTROY \
        REFCOUNT_TYPE_DECLARE_DESTROY, \
        REFCOUNT_TYPE 

DEFINE_REFCOUNT_TYPE

#define DEFINE_REFCOUNT_TYPE \
        REFCOUNT_TYPE, \
        DEFINE_CREATE_WITH_EXTRA_SIZE, \
        DEFINE_CREATE, \
        DEFINE_DESTROY 

INC_REF

#define INC_REF \
        REFCOUNT_TYPE, \
        REFCOUNT_TYPE 

DEC_REF

#define DEC_REF \
        REFCOUNT_TYPE, \
        REFCOUNT_TYPE 

INIT_REF

#define INIT_REF \
        REFCOUNT_TYPE, \
        REFCOUNT_TYPE