From b178c611f0430381dad9931817ffb1a071e78df3 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 17 Apr 2011 17:16:38 +0200 Subject: [PATCH] Trans: trans_open_rp() removed It did never make much sense, since the resource pool is automatically destroyed when the transaction is over. --- ucw/trans.c | 5 ++--- ucw/trans.h | 6 +----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/ucw/trans.c b/ucw/trans.c index a58d7d16..fffcf750 100644 --- a/ucw/trans.c +++ b/ucw/trans.c @@ -41,7 +41,7 @@ trans_cleanup(void) } struct trans * -trans_open_rp(struct respool *rp) +trans_open(void) { trans_init(); struct ucwlib_context *c = ucwlib_thread_context(); @@ -51,8 +51,7 @@ trans_open_rp(struct respool *rp) 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); diff --git a/ucw/trans.h b/ucw/trans.h index 95d9ce11..3b7220f7 100644 --- a/ucw/trans.h +++ b/ucw/trans.h @@ -27,11 +27,7 @@ struct trans { 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); -- 2.39.2