Lines Matching refs:region

83  * Initialize a transaction region in shared memory.
151 /* Join/create the txn region. */
169 /* Fill in region-related fields. */
170 tmgrp->region = tmgrp->reginfo.addr;
171 tmgrp->mem = &tmgrp->region[1];
174 tmgrp->region->maxtxns = maxtxns;
175 if ((ret = __txn_init(tmgrp->region)) != 0)
178 } else if (tmgrp->region->magic != DB_TXNMAGIC) {
179 /* Check if valid region. */
220 * Panic a transaction region.
229 dbenv->tx_info->region->hdr.panic = 1;
240 * region of the TXN_DETAIL structure.
318 if (mgr->region->last_txnid == TXN_INVALID) {
337 SH_TAILQ_INSERT_HEAD(&mgr->region->active_txn, td, links, __txn_detail);
339 id = ++mgr->region->last_txnid;
340 ++mgr->region->nbegins;
352 off = (u_int8_t *)td - (u_int8_t *)mgr->region;
505 * Close the transaction region, does not imply a checkpoint.
553 * Remove the transaction region.
589 if (txnp != NULL && txnp->mgrp != NULL && txnp->mgrp->region != NULL) {
590 tp = (TXN_DETAIL *)((u_int8_t *)txnp->mgrp->region + txnp->off);
641 tp = (TXN_DETAIL *)((u_int8_t *)mgr->region + txnp->off);
643 SH_TAILQ_REMOVE(&mgr->region->active_txn,
651 mgr->region->ncommits++;
653 mgr->region->naborts++;
760 last_ckp_time = mgr->region->time_ckp;
800 if (!IS_ZERO_LSN(mgr->region->pending_ckp))
801 ckp_lsn = mgr->region->pending_ckp;
804 SH_TAILQ_FIRST(&mgr->region->active_txn, __txn_detail);
817 mgr->region->pending_ckp = ckp_lsn;
839 last_ckp = mgr->region->last_ckp;
840 ZERO_LSN(mgr->region->pending_ckp);
853 mgr->region->last_ckp = ckp_lsn;
854 (void)time(&mgr->region->time_ckp);
862 * Called at every interface to verify if the region has changed size,
863 * and if so, to remap the region in and reset the process' pointers.
871 if (tp->reginfo.size == tp->region->hdr.size)
874 /* Detach/reattach the region. */
875 if ((ret = __db_rreattach(&tp->reginfo, tp->region->hdr.size)) != 0)
878 /* Reset region information. */
879 tp->region = tp->reginfo.addr;
880 tp->mem = &tp->region[1];
894 oldmax = tp->region->maxtxns;
897 (u_int8_t *)tp->mutexp - (u_int8_t *)tp->region : 0;
902 tp->region = tp->reginfo.addr;
905 curaddr = (u_int8_t *)tp->region + oldsize;
906 tp->mem = &tp->region[1];
908 (db_mutex_t *)((u_int8_t *)tp->region + mutex_offset) : NULL;
914 tp->region->maxtxns = 2 * oldmax;
934 nactive = mgr->region->nbegins -
935 mgr->region->naborts - mgr->region->ncommits;
940 * that have been created since we unlocked the region.
947 stats->st_last_txnid = mgr->region->last_txnid;
948 stats->st_last_ckp = mgr->region->last_ckp;
949 stats->st_maxtxns = mgr->region->maxtxns;
950 stats->st_naborts = mgr->region->naborts;
951 stats->st_nbegins = mgr->region->nbegins;
952 stats->st_ncommits = mgr->region->ncommits;
953 stats->st_pending_ckp = mgr->region->pending_ckp;
954 stats->st_time_ckp = mgr->region->time_ckp;
962 for (txnp = SH_TAILQ_FIRST(&mgr->region->active_txn, __txn_detail);
973 stats->st_region_wait = mgr->region->hdr.lock.mutex_set_wait;
974 stats->st_region_nowait = mgr->region->hdr.lock.mutex_set_nowait;
975 stats->st_refcnt = mgr->region->hdr.refcnt;
976 stats->st_regsize = mgr->region->hdr.size;
999 /* Free the transaction detail in the region. */
1001 tp = (TXN_DETAIL *)((u_int8_t *)mgr->region + kids->off);
1002 SH_TAILQ_REMOVE(&mgr->region->active_txn,
1024 * follow the links in the transaction region.
1035 hold_tp = (TXN_DETAIL *)((u_int8_t *)mgr->region + hold_off);
1036 req_tp = (TXN_DETAIL *)((u_int8_t *)mgr->region + req_off);
1040 (TXN_DETAIL *)((u_int8_t *)mgr->region + req_tp->parent);