]> pd.if.org Git - nbds/blobdiff - include/common.h
tweak list
[nbds] / include / common.h
index 5bc2a6f5ff321f3af65ae6016cb37ae991714cec..d638fc93803c6ba12bb4b332471c445f08fe4eb9 100644 (file)
 #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;