]> pd.if.org Git - nbds/commitdiff
add missing header file for txn
authorjdybnis <jdybnis@9ec2166a-aeea-11dd-8830-69e4bb380a4a>
Sun, 16 Nov 2008 04:10:46 +0000 (04:10 +0000)
committerjdybnis <jdybnis@9ec2166a-aeea-11dd-8830-69e4bb380a4a>
Sun, 16 Nov 2008 04:10:46 +0000 (04:10 +0000)
include/txn.h [new file with mode: 0644]
makefile

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
index 939f8dd1bccb12c96ae5227ab73aeaafe08364bf..8f508379e6903376f91f7fa24392d65127feb2a1 100644 (file)
--- a/makefile
+++ b/makefile
@@ -8,8 +8,8 @@
 OPT       := -fwhole-program -combine -03 #-DNDEBUG
 CFLAGS := -g -Wall -Werror -std=c99 -m64 -fnested-functions #$(OPT) #-DENABLE_TRACE 
 INCS   := $(addprefix -I, include)
-TESTS  := output/rcu_test output/list_test output/ht_test
-EXES   := $(TESTS) output/txn_test
+TESTS  := output/rcu_test output/list_test output/ht_test output/txn_test
+EXES   := $(TESTS)
 
 RUNTIME_SRCS   := runtime/runtime.c runtime/rcu.c runtime/lwt.c runtime/mem.c 
 TEST_SRCS      := $(RUNTIME_SRCS) 
@@ -20,8 +20,6 @@ txn_test_SRCS  := $(TEST_SRCS) struct/ht.c txn/txn.c
 
 tests: $(TESTS) 
 
-txn: output/txn_test
-
 ###################################################################################################
 # Run the tests
 ###################################################################################################