• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/BerkeleyDB-21/db/db/

Lines Matching refs:hp

461 #define	FIND_GENERATION(hp, txnid, gen) do {				\
463 for (__i = 0; __i <= (hp)->generation; __i++) \
465 if ((hp)->gen_array[__i].txn_min < \
466 (hp)->gen_array[__i].txn_max ? \
467 ((txnid) >= (hp)->gen_array[__i].txn_min && \
468 (txnid) <= (hp)->gen_array[__i].txn_max) : \
469 ((txnid) >= (hp)->gen_array[__i].txn_min || \
470 (txnid) <= (hp)->gen_array[__i].txn_max)) \
472 DB_ASSERT(env, __i <= (hp)->generation); \
473 gen = (hp)->gen_array[__i].generation; \
484 __db_txnlist_add(env, hp, txnid, status, lsn)
486 DB_TXNHEAD *hp;
496 LIST_INSERT_HEAD(&hp->head[DB_TXNLIST_MASK(hp, txnid)], elp, links);
499 FIND_GENERATION(hp, txnid, elp->u.t.generation);
503 if (txnid > hp->maxid)
504 hp->maxid = txnid;
505 if (lsn != NULL && IS_ZERO_LSN(hp->maxlsn) && status == TXN_COMMIT)
506 hp->maxlsn = *lsn;
509 status != TXN_COMMIT || LOG_COMPARE(&hp->maxlsn, lsn) >= 0);
521 __db_txnlist_remove(env, hp, txnid)
523 DB_TXNHEAD *hp;
530 hp, TXNLIST_TXNID, txnid, &entry, 1, &status));
544 __db_txnlist_ckp(env, hp, ckp_lsn)
546 DB_TXNHEAD *hp;
552 if (IS_ZERO_LSN(hp->ckplsn) && !IS_ZERO_LSN(hp->maxlsn) &&
553 LOG_COMPARE(&hp->maxlsn, ckp_lsn) >= 0)
554 hp->ckplsn = *ckp_lsn;
564 __db_txnlist_end(env, hp)
566 DB_TXNHEAD *hp;
571 if (hp == NULL)
574 for (i = 0; i < hp->nslots; i++)
575 while (hp != NULL && (p = LIST_FIRST(&hp->head[i])) != NULL) {
593 if (hp->gen_array != NULL)
594 __os_free(env, hp->gen_array);
595 __os_free(env, hp);
610 __db_txnlist_find(env, hp, txnid, statusp)
612 DB_TXNHEAD *hp;
620 return (__db_txnlist_find_internal(env, hp,
633 __db_txnlist_update(env, hp, txnid, status, lsn, ret_status, add_ok)
635 DB_TXNHEAD *hp;
648 hp, TXNLIST_TXNID, txnid, &elp, 0, ret_status);
652 return (__db_txnlist_add(env, hp, txnid, status, lsn));
662 if (lsn != NULL && IS_ZERO_LSN(hp->maxlsn) && status == TXN_COMMIT)
663 hp->maxlsn = *lsn;
677 hp, type, txnid, txnlistp, delete, statusp)
679 DB_TXNHEAD *hp;
693 if (hp == NULL)
699 FIND_GENERATION(hp, txnid, generation);
707 head = &hp->head[DB_TXNLIST_MASK(hp, hash)];
749 __db_txnlist_gen(env, hp, incr, min, max)
751 DB_TXNHEAD *hp;
770 --hp->generation;
771 memmove(hp->gen_array, &hp->gen_array[1],
772 (hp->generation + 1) * sizeof(hp->gen_array[0]));
774 ++hp->generation;
775 if (hp->generation >= hp->gen_alloc) {
776 hp->gen_alloc *= 2;
777 if ((ret = __os_realloc(env, hp->gen_alloc *
778 sizeof(hp->gen_array[0]), &hp->gen_array)) != 0)
781 memmove(&hp->gen_array[1], &hp->gen_array[0],
782 hp->generation * sizeof(hp->gen_array[0]));
783 hp->gen_array[0].generation = hp->generation;
784 hp->gen_array[0].txn_min = min;
785 hp->gen_array[0].txn_max = max;
797 __db_txnlist_lsnadd(env, hp, lsnp)
799 DB_TXNHEAD *hp;
808 LIST_FOREACH(elp, &hp->head[0], links)
813 if ((ret = __db_txnlist_lsninit(env, hp, lsnp)) != 0)
822 __db_txnlist_end(env, hp);
839 __db_txnlist_lsnget(env, hp, lsnp, flags)
841 DB_TXNHEAD *hp;
850 LIST_FOREACH(elp, &hp->head[0], links)
871 __db_txnlist_lsninit(env, hp, lsnp)
873 DB_TXNHEAD *hp;
883 LIST_INSERT_HEAD(&hp->head[0], elp, links);
895 err: __db_txnlist_end(env, hp);
907 __db_txnlist_print(hp)
908 DB_TXNHEAD *hp;
915 (u_long)hp->maxid, (u_long)hp->generation);
916 for (i = 0; i < hp->nslots; i++)
917 LIST_FOREACH(p, &hp->head[i], links) {