From: Martin Mares Date: Sun, 17 Apr 2011 15:16:38 +0000 (+0200) Subject: Trans: trans_open_rp() removed X-Git-Tag: v5.0~74^2~29 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=b178c611f0430381dad9931817ffb1a071e78df3;p=libucw.git Trans: trans_open_rp() removed It did never make much sense, since the resource pool is automatically destroyed when the transaction is over. --- 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);