]> pd.if.org Git - nbds/blobdiff - include/txn.h
add missing header file for txn
[nbds] / include / txn.h
diff --git a/include/txn.h b/include/txn.h
new file mode 100644 (file)
index 0000000..9b80e17
--- /dev/null
@@ -0,0 +1,15 @@
+/* 
+ * Written by Josh Dybnis and released to the public domain, as explained at
+ * http://creativecommons.org/licenses/publicdomain
+ */
+#ifndef TXN_H
+#define TXN_H
+#include "ht.h"
+
+typedef enum { TXN_READ_WRITE, TXN_READ_ONLY, TXN_BLIND_WRITE } txn_access_t;
+typedef enum { TXN_DIRTY_READ, TXN_READ_COMMITTED, TXN_REPEATABLE_READ } txn_isolation_t;
+
+typedef struct txn txn_t;
+
+txn_t *txn_begin (txn_access_t access, txn_isolation_t isolation, hash_table_t *ht);
+#endif//TXN_H