X-Git-Url: https://pd.if.org/git/?p=nbds;a=blobdiff_plain;f=include%2Fcommon.h;h=d638fc93803c6ba12bb4b332471c445f08fe4eb9;hp=5bc2a6f5ff321f3af65ae6016cb37ae991714cec;hb=269f52d6f8cd031692c83afaa05c389115d05bd0;hpb=95cfcadf0f8f69f4237cde9a61ea6c64b40f8043 diff --git a/include/common.h b/include/common.h index 5bc2a6f..d638fc9 100644 --- a/include/common.h +++ b/include/common.h @@ -32,16 +32,16 @@ #define SYNC_ADD __sync_add_and_fetch #define SYNC_FETCH_AND_OR __sync_fetch_and_or -#define MASK(n) ((1LL << (n)) - 1) - -#define TAG (1LL << 63) -#define IS_TAGGED(v) ((int64_t)(v) < 0) -#define TAG_VALUE(v) ((uint64_t)(v) | TAG) -#define STRIP_TAG(v) ((uint64_t)(v) & ~TAG) +#define MASK(n) ((1ULL << (n)) - 1) #define TRUE 1 #define FALSE 0 +#define TAG (1ULL << 63) +#define TAG_VALUE(v) ((uint64_t)(v) | TAG) +#define IS_TAGGED(v) ((uint64_t)(v) & TAG) +#define STRIP_TAG(v) ((uint64_t)(v) & ~TAG) + typedef unsigned long long uint64_t; typedef unsigned int uint32_t; typedef unsigned char uint8_t;