FreeBSD/sys/dev/cxgb/ulp/tom/cxgb_listen.c
/*
 * Look for the listening socket's context entry in the hash and return it.
 */
Look for the listening socket's context entry in the hash and return it.
Look for the listening socket ' s context entry in the hash and return it .
static struct listen_ctx *
listen_hash_find(struct tom_data *td, struct inpcb *inp)
{
	int bucket = listen_hashfn(inp, td->listen_mask);
	struct listen_ctx *lctx;
	mtx_lock(&td->lctx_hash_lock);
	LIST_FOREACH(lctx, &td->listen_hash[bucket], link) {
		if (lctx->inp == inp)
			break;
	}
	mtx_unlock(&td->lctx_hash_lock);
	return (lctx);
}
static struct listen_ctx * listen_hash_find ( struct tom_data * td , struct inpcb * inp ) { int bucket = listen_hashfn ( inp , td -> listen_mask ) ; struct listen_ctx * lctx ; mtx_lock ( & td -> lctx_hash_lock ) ; LIST_FOREACH ( lctx , & td -> listen_hash [ bucket ] , link ) { if ( lctx -> inp == inp ) break ; } mtx_unlock ( & td -> lctx_hash_lock ) ; return ( lctx ) ; }
Look for the listening socket's context entry in the hash and return it.
Look for the listening socket ' s context entry in the hash and return it .