]> pd.if.org Git - nbds/blobdiff - include/common.h
port to Ubuntu 8.10 x86-64 w/ gcc 4.3.2
[nbds] / include / common.h
index c644bb5631f0ab480c0e756f62bb53aa4118f4dd..8988ed01debc6ec5224ef7b17e823a34fcceba63 100644 (file)
 #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;