X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=include%2Fcommon.h;h=8988ed01debc6ec5224ef7b17e823a34fcceba63;hb=0f6e9afb06b03647c4c5f2499ddab12f42b4340e;hp=c644bb5631f0ab480c0e756f62bb53aa4118f4dd;hpb=a03cf3b0c40e6c3b8b4877b49a64288cb3fcb919;p=nbds 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;