lib/libc/db/mpool/mpool.c
static BKT *
mpool_look(MPOOL *mp, pgno_t pgno)
{
	struct _hqh *head;
	BKT *bp;

	head = &mp->hqh[HASHKEY(pgno)];
	TAILQ_FOREACH(bp, head, hq)
		if (bp->pgno == pgno) {
#ifdef STATISTICS
			++mp->cachehit;
#endif
			return (bp);
		}
#ifdef STATISTICS
	++mp->cachemiss;
#endif
	return (NULL);
}
/*
 * mpool_look
 *	Lookup a page in the cache.
 */
mpool_look
Lookup a page in the cache.
mpool_look Lookup a page in the cache .
static BKT *
mpool_look(MPOOL *mp, pgno_t pgno)
{
	struct _hqh *head;
	BKT *bp;
	head = &mp->hqh[HASHKEY(pgno)];
	TAILQ_FOREACH(bp, head, hq)
		if (bp->pgno == pgno) {
#ifdef STATISTICS
			++mp->cachehit;
#endif
			return (bp);
		}
#ifdef STATISTICS
	++mp->cachemiss;
#endif
	return (NULL);
}
static BKT * mpool_look ( MPOOL * mp , pgno_t pgno ) { struct _hqh * head ; BKT * bp ; head = & mp -> hqh [ HASHKEY ( pgno ) ] ; TAILQ_FOREACH ( bp , head , hq ) if ( bp -> pgno == pgno ) { #ifdef STATISTICS ++ mp -> cachehit ; #endif return ( bp ) ; } #ifdef STATISTICS ++ mp -> cachemiss ; #endif return ( NULL ) ; }
mpool_look
      Lookup a page in the cache.
mpool_look Lookup a page in the cache .