2 * See the file LICENSE for redistribution information.
4 * Copyright (c) 1996-2009 Oracle. All rights reserved.
12 #include "dbinc/txn.h"
16 * Transaction specific initialization of the DB_ENV structure.
18 * PUBLIC: int __txn_env_create __P((DB_ENV *));
21 __txn_env_create(dbenv)
26 * Our caller has not yet had the opportunity to reset the panic
27 * state or turn off mutex locking, and so we can neither check
28 * the panic state or acquire a mutex in the DB_ENV create path.
30 dbenv->tx_max = DEF_MAX_TXNS;
36 * __txn_env_destroy --
37 * Transaction specific destruction of the DB_ENV structure.
39 * PUBLIC: void __txn_env_destroy __P((DB_ENV *));
42 __txn_env_destroy(dbenv)
45 COMPQUIET(dbenv, NULL);
49 * PUBLIC: int __txn_get_tx_max __P((DB_ENV *, u_int32_t *));
52 __txn_get_tx_max(dbenv, tx_maxp)
60 ENV_NOT_CONFIGURED(env,
61 env->tx_handle, "DB_ENV->get_tx_max", DB_INIT_TXN);
64 /* Cannot be set after open, no lock required to read. */
65 *tx_maxp = ((DB_TXNREGION *)
66 env->tx_handle->reginfo.primary)->maxtxns;
68 *tx_maxp = dbenv->tx_max;
76 * PUBLIC: int __txn_set_tx_max __P((DB_ENV *, u_int32_t));
79 __txn_set_tx_max(dbenv, tx_max)
87 ENV_ILLEGAL_AFTER_OPEN(env, "DB_ENV->set_tx_max");
89 dbenv->tx_max = tx_max;
94 * PUBLIC: int __txn_get_tx_timestamp __P((DB_ENV *, time_t *));
97 __txn_get_tx_timestamp(dbenv, timestamp)
101 *timestamp = dbenv->tx_timestamp;
106 * __txn_set_tx_timestamp --
107 * Set the transaction recovery timestamp.
109 * PUBLIC: int __txn_set_tx_timestamp __P((DB_ENV *, time_t *));
112 __txn_set_tx_timestamp(dbenv, timestamp)
120 ENV_ILLEGAL_AFTER_OPEN(env, "DB_ENV->set_tx_timestamp");
122 dbenv->tx_timestamp = *timestamp;