It did never make much sense, since the resource pool is automatically
destroyed when the transaction is over.
}
struct trans *
-trans_open_rp(struct respool *rp)
+trans_open(void)
{
trans_init();
struct ucwlib_context *c = ucwlib_thread_context();
struct trans *t = mp_alloc(mp, sizeof(*t));
t->trans_pool_state = mst;
- if (!rp)
- rp = rp_new("trans", mp);
+ struct respool *rp = rp_new("trans", mp);
t->rpool = rp;
t->prev_rpool = rp_switch(rp);
void trans_init(void); // Called automatically on trans_open() if needed
void trans_cleanup(void); // Free memory occupied by the transaction system pools
-struct trans *trans_open_rp(struct respool *rp);
-static inline struct trans *trans_open(void)
-{
- return trans_open_rp(NULL);
-}
+struct trans *trans_open(void);
struct trans *trans_get_current(void);
void trans_commit(void);
void trans_rollback(void);