2 * The UCW Library -- Transactions
4 * (c) 2008 Martin Mares <mj@ucw.cz>
6 * This software may be freely distributed and used according to the terms
7 * of the GNU Lesser General Public License.
13 #include "ucw/mempool.h"
20 struct trans *prev_trans;
21 struct mempool_state *trans_pool_state;
22 struct respool *rpool;
23 struct respool *prev_rpool;
27 void trans_init(void); // Called automatically on trans_open() if needed
28 void trans_cleanup(void); // Free memory occupied by the transaction system pools
30 struct trans *trans_open_rp(struct respool *rp);
31 static inline struct trans *trans_open(void)
33 return trans_open_rp(NULL);
35 struct trans *trans_get_current(void);
36 void trans_commit(void);
37 void trans_rollback(void);
38 void trans_dump(void);