Lines Matching refs:bhp
37 BH *bhp;
93 bhp = NULL;
166 for (bhp = SH_TAILQ_FIRST(&dbmp->htab[bucket], __bh);
167 bhp != NULL; bhp = SH_TAILQ_NEXT(bhp, hq, __bh)) {
169 if (bhp->pgno != *pgnoaddr || bhp->mf_offset != mf_offset)
173 if (bhp->ref == UINT16_T_MAX) {
176 __memp_fn(dbmfp), (u_long)bhp->pgno);
187 ++bhp->ref;
199 for (first = 1; F_ISSET(bhp, BH_LOCKED); first = 0) {
211 LOCKBUFFER(dbmp, bhp);
213 UNLOCKBUFFER(dbmp, bhp);
222 if (F_ISSET(bhp, BH_TRASH))
230 if (F_ISSET(bhp, BH_CALLPGIN)) {
231 if ((ret = __memp_pg(dbmfp, bhp, 1)) != 0)
233 F_CLR(bhp, BH_CALLPGIN);
238 *(void **)addrp = bhp->buf;
244 sizeof(u_int8_t) + mfp->stat.st_pagesize, NULL, &bhp)) != 0)
248 if ((ALIGNTYPE)bhp->buf & (sizeof(size_t) - 1)) {
256 memset(bhp, 0, sizeof(BH));
257 LOCKINIT(dbmp, &bhp->mutex);
258 bhp->ref = 1;
259 bhp->pgno = *pgnoaddr;
260 bhp->mf_offset = mf_offset;
267 SH_TAILQ_INSERT_HEAD(&dbmp->htab[bucket], bhp, hq, __bh);
268 SH_TAILQ_INSERT_TAIL(&mp->bhq, bhp, q);
284 memset(bhp->buf, 0, mfp->stat.st_pagesize);
286 memset(bhp->buf, 0, mfp->clear_len);
288 memset(bhp->buf + mfp->clear_len, 0xdb,
303 bhp, LF_ISSET(DB_MPOOL_CREATE))) != 0) {
310 if (bhp->ref == 1)
311 __memp_bhfree(dbmp, mfp, bhp, 1);
324 if (bhp->pgno > mfp->last_pgno)
325 mfp->last_pgno = bhp->pgno;
328 *(void **)addrp = bhp->buf;
346 --bhp->ref;