2 * Written by Josh Dybnis and released to the public domain, as explained at
3 * http://creativecommons.org/licenses/publicdomain
10 typedef enum { TXN_REPEATABLE_READ, TXN_READ_COMMITTED, TXN_READ_ONLY } txn_type_e;
11 typedef enum { TXN_RUNNING, TXN_VALIDATING, TXN_VALIDATED, TXN_ABORTED } txn_state_e;
13 typedef struct txn txn_t;
15 txn_t * txn_begin (txn_type_e type, map_t *map);
16 void txn_abort (txn_t *txn);
17 txn_state_e txn_commit (txn_t *txn);
19 uint64_t tm_get (txn_t *txn, void *key);
20 void tm_set (txn_t *txn, void *key, uint64_t value);