X-Git-Url: https://pd.if.org/git/?p=nbds;a=blobdiff_plain;f=include%2Fcommon.h;fp=include%2Fcommon.h;h=8988ed01debc6ec5224ef7b17e823a34fcceba63;hp=c644bb5631f0ab480c0e756f62bb53aa4118f4dd;hb=2b107655a1df8ae7703b44ef8cf1430a7250a5c3;hpb=a1d0b3ca99552878b1becf561d8f3291992aaa67 diff --git a/include/common.h b/include/common.h index c644bb5..8988ed0 100644 --- a/include/common.h +++ b/include/common.h @@ -40,10 +40,12 @@ #define STRIP_TAG(v, tag) ((v) & ~tag) #define DOES_NOT_EXIST 0 -#define ERROR_INVALID_OPTION (-1) -#define ERROR_INVALID_ARGUMENT (-2) +#define ERROR_INVALID_OPTION (-1) +#define ERROR_INVALID_ARGUMENT (-2) #define ERROR_UNSUPPORTED_FEATURE (-3) -#define ERROR_TXN_NOT_RUNNING (-4) +#define ERROR_TXN_NOT_RUNNING (-4) + +#define VOLATILE(x) *((volatile typeof(x) *)&x) typedef unsigned long long uint64_t; typedef unsigned int uint32_t;