X-Git-Url: https://pd.if.org/git/?p=nbds;a=blobdiff_plain;f=txn%2Ftxn.c;h=1cc8e2f84fdeff975d719bfada0608bed62c42bb;hp=5648d16abbba2b2d11b3f0b75bbbb267251746cb;hb=a03cf3b0c40e6c3b8b4877b49a64288cb3fcb919;hpb=e592519ef19f890e551c27f47ef8b773bb4860da diff --git a/txn/txn.c b/txn/txn.c index 5648d16..1cc8e2f 100644 --- a/txn/txn.c +++ b/txn/txn.c @@ -5,6 +5,7 @@ #include "common.h" #include "txn.h" #include "mem.h" +#include "rcu.h" #include "skiplist.h" #define UNDETERMINED_VERSION 0 @@ -196,8 +197,8 @@ void txn_abort (txn_t *txn) { update->version = ABORTED_VERSION; } - nbd_defer_free(txn->writes); - nbd_defer_free(txn); + rcu_defer_free(txn->writes); + rcu_defer_free(txn); } txn_state_e txn_commit (txn_t *txn) { @@ -228,8 +229,8 @@ txn_state_e txn_commit (txn_t *txn) { } } while (old_count != temp); - nbd_defer_free(txn->writes); - nbd_defer_free(txn); + rcu_defer_free(txn->writes); + rcu_defer_free(txn); return state; } @@ -341,7 +342,7 @@ map_val_t txn_map_get (txn_t *txn, map_key_t key) { } if (update->version <= min_active_version) { if (map_cas(txn->map, key, TAG_VALUE(val, TAG2), value) == TAG_VALUE(val, TAG2)) { - nbd_defer_free(update); + rcu_defer_free(update); } } }