X-Git-Url: https://pd.if.org/git/?p=nbds;a=blobdiff_plain;f=txn%2Ftxn.c;h=b0b6174359b05d896e68a81a7e675c565d6b8a26;hp=013388e78973f0e435d9bff4b13727ecec98c8e0;hb=b21e1c182a2e469240d2b1cbbda37f2dfeb880d9;hpb=d61d7ffdfa8fab555a5086e61d2e9dfe699a14b9 diff --git a/txn/txn.c b/txn/txn.c index 013388e..b0b6174 100644 --- a/txn/txn.c +++ b/txn/txn.c @@ -29,7 +29,7 @@ typedef struct write_rec { struct txn { uint64_t rv; uint64_t wv; - hash_table_t *ht; + hashtable_t *ht; write_rec_t *writes; uint32_t writes_size; uint32_t writes_count; @@ -50,7 +50,7 @@ update_rec_t *alloc_update_rec (void) { return u; } -txn_t *txn_begin (txn_access_t access, txn_isolation_t isolation, hash_table_t *ht) { +txn_t *txn_begin (txn_access_t access, txn_isolation_t isolation, hashtable_t *ht) { txn_t *txn = (txn_t *)nbd_malloc(sizeof(txn_t)); memset(txn, 0, sizeof(txn_t)); txn->access = access; @@ -240,11 +240,3 @@ void txn_ht_put (txn_t *txn, const char *key, uint32_t key_len, int64_t value) { txn->writes[i].key = key; txn->writes[i].rec = update; } - -#ifdef MAKE_txn_test -#include "runtime.h" -int main (void) { - nbd_init(); - return 0; -} -#endif//txn_test