]> pd.if.org Git - nbds/blob - include/txn.h
generic interface for map-like data structures
[nbds] / include / txn.h
1 /* 
2  * Written by Josh Dybnis and released to the public domain, as explained at
3  * http://creativecommons.org/licenses/publicdomain
4  */
5 #ifndef TXN_H
6 #define TXN_H
7 #include "map.h"
8
9 typedef enum { TXN_READ_WRITE, TXN_READ_ONLY, TXN_BLIND_WRITE } txn_access_t;
10 typedef enum { TXN_DIRTY_READ, TXN_READ_COMMITTED, TXN_REPEATABLE_READ } txn_isolation_t;
11
12 typedef struct txn txn_t;
13
14 txn_t *txn_begin (txn_access_t access, txn_isolation_t isolation, map_t *map);
15 #endif//TXN_H