]> pd.if.org Git - nbds/blobdiff - include/txn.h
all structures now support arbitrary type keys with a fast path for integers
[nbds] / include / txn.h
index 51db400e80b520567c1c1f8fb5db07cb2f67a2f1..56144e93086d0a15ee96c4e909b80e7a7ac6e55f 100644 (file)
@@ -13,11 +13,11 @@ typedef enum { TXN_RUNNING, TXN_VALIDATING, TXN_VALIDATED, TXN_ABORTED } txn_sta
 
 typedef struct txn txn_t;
 
-txn_t *     txn_begin  (txn_access_e access, txn_isolation_e isolation, map_type_t map_type);
+txn_t *     txn_begin  (txn_access_e access, txn_isolation_e isolation, map_t *map);
 void        txn_abort  (txn_t *txn);
 txn_state_e txn_commit (txn_t *txn);
 
-uint64_t tm_get (txn_t *txn, const char *key, uint32_t key_len);
-void     tm_set (txn_t *txn, const char *key, uint32_t key_len, uint64_t value);
+uint64_t tm_get (txn_t *txn, void *key);
+void     tm_set (txn_t *txn, void *key, uint64_t value);
 
 #endif//TXN_H