]> pd.if.org Git - nbds/commitdiff
move files around
authorjdybnis <jdybnis@9ec2166a-aeea-11dd-8830-69e4bb380a4a>
Sun, 23 Nov 2008 22:53:18 +0000 (22:53 +0000)
committerjdybnis <jdybnis@9ec2166a-aeea-11dd-8830-69e4bb380a4a>
Sun, 23 Nov 2008 22:53:18 +0000 (22:53 +0000)
include/ht.h [deleted file]
include/struct.h
include/txn.h
makefile
struct/hashtable.c
test/ht_test.c
todo

diff --git a/include/ht.h b/include/ht.h
deleted file mode 100644 (file)
index 49198bb..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/* 
- * Written by Josh Dybnis and released to the public domain, as explained at
- * http://creativecommons.org/licenses/publicdomain
- */
-#ifndef HT_H
-#define HT_H
-
-#include "struct.h"
-
-#define HT_EXPECT_NOT_EXISTS ( 0)
-#define HT_EXPECT_EXISTS     (-1)
-#define HT_EXPECT_WHATEVER   (-2)
-
-typedef struct hash_table_i *hash_table_t;
-
-hash_table_t *ht_alloc (void);
-void ht_free (hash_table_t *ht);
-uint64_t ht_get (hash_table_t *ht, const char *key, uint32_t len);
-uint64_t ht_compare_and_set (hash_table_t *ht, const char *key, uint32_t key_len, uint64_t expected_val, uint64_t val);
-uint64_t ht_remove (hash_table_t *ht, const char *key, uint32_t len);
-uint64_t ht_count (hash_table_t *ht);
-
-#endif//HT_H
index fa3f704631e0028fbc125cc16eb33a23815dbeb7..bb5125a36b9cf7076dc9ff0b5c66f39b02c7143d 100644 (file)
@@ -3,4 +3,17 @@
 
 #define DOES_NOT_EXIST 0
 
+#define HT_EXPECT_NOT_EXISTS ( 0)
+#define HT_EXPECT_EXISTS     (-1)
+#define HT_EXPECT_WHATEVER   (-2)
+
+typedef struct hash_table_i *hash_table_t;
+
+hash_table_t *ht_alloc (void);
+void ht_free (hash_table_t *ht);
+uint64_t ht_get (hash_table_t *ht, const char *key, uint32_t len);
+uint64_t ht_compare_and_set (hash_table_t *ht, const char *key, uint32_t key_len, uint64_t expected_val, uint64_t val);
+uint64_t ht_remove (hash_table_t *ht, const char *key, uint32_t len);
+uint64_t ht_count (hash_table_t *ht);
+
 #endif//STRUCT_H
index 9b80e17f5e1105c63894c448287c7d25a4ca9294..b0000747e0d25b679d4ef431f604b3a7561bdfd9 100644 (file)
@@ -4,7 +4,7 @@
  */
 #ifndef TXN_H
 #define TXN_H
-#include "ht.h"
+#include "struct.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;
index bc31f328342cfa93598c32bb70fdbbcde2ad844f..a4700efaa7fa7bf1341ed31ac47c2afa25342704 100644 (file)
--- a/makefile
+++ b/makefile
@@ -16,8 +16,8 @@ TEST_SRCS      := $(RUNTIME_SRCS)
 rcu_test_SRCS  := $(TEST_SRCS)
 list_test_SRCS := $(TEST_SRCS) struct/list.c
 skiplist_test_SRCS := $(TEST_SRCS) struct/skiplist.c
-ht_test_SRCS   := $(TEST_SRCS) struct/ht.c test/ht_test.c test/CuTest.c
-txn_test_SRCS  := $(TEST_SRCS) struct/ht.c txn/txn.c
+ht_test_SRCS := $(TEST_SRCS) struct/hashtable.c test/ht_test.c test/CuTest.c
+txn_test_SRCS  := $(TEST_SRCS) struct/hashtable.c txn/txn.c
 
 tests: $(TESTS) 
 
index 953200d33d8e8da1a005249602de17942a814d28..45c9ffc6f9f98ad479c33b4dd5ff00a557515a1e 100644 (file)
@@ -13,7 +13,6 @@
  */
 
 #include "common.h"
-#include "ht.h"
 #include "murmur.h"
 #include "mem.h"
 #include "struct.h"
index eda9c51775facba0a6f6812c1d4f7a0d328a7bc5..6d4a53b4821f7d20b7aba3bd2a851562eaeb62b5 100644 (file)
@@ -7,7 +7,7 @@
 #include "runtime.h"
 #include "CuTest.h"
 #include "common.h"
-#include "ht.h"
+#include "struct.h"
 #include "mem.h"
 #include "lwt.h"
 
diff --git a/todo b/todo
index e8684e1e622bacf5f27b7d8d7124c2365d048c5d..a54afec7d03e81dcb4d357491ad1b54f61180386 100644 (file)
--- a/todo
+++ b/todo
@@ -3,3 +3,5 @@
 - investigate 16 byte CAS; ht can store GUIDs inline instead of pointers to actual keys 
 - test ht
 + optimize tracing code, still too much overhead
+- use NULL instead of a sentinal node in skiplist and list
+- make interfaces for all data structures consistent