FreeBSD/sys/net/netisr.c
/*
 * Query current per-workstream queue limit for a protocol.
 */
Query current per-workstream queue limit for a protocol.
Query current per - workstream queue limit for a protocol .
void
netisr_getqlimit(const struct netisr_handler *nhp, u_int *qlimitp)
{
	struct rm_priotracker tracker;
#ifdef INVARIANTS
	const char *name;
#endif
	u_int proto;
	proto = nhp->nh_proto;
#ifdef INVARIANTS
	name = nhp->nh_name;
#endif
	KASSERT(proto < NETISR_MAXPROT,
	    ("%s(%u): protocol too big for %s", __func__, proto, name));
	NETISR_RLOCK(&tracker);
	KASSERT(netisr_proto[proto].np_handler != NULL,
	    ("%s(%u): protocol not registered for %s", __func__, proto,
	    name));
	*qlimitp = netisr_proto[proto].np_qlimit;
	NETISR_RUNLOCK(&tracker);
}
void netisr_getqlimit ( const struct netisr_handler * nhp , u_int * qlimitp ) { struct rm_priotracker tracker ; #ifdef INVARIANTS const char * name ; #endif u_int proto ; proto = nhp -> nh_proto ; #ifdef INVARIANTS name = nhp -> nh_name ; #endif KASSERT ( proto < NETISR_MAXPROT , ( " " , __func__ , proto , name ) ) ; NETISR_RLOCK ( & tracker ) ; KASSERT ( netisr_proto [ proto ] . np_handler != NULL , ( " " , __func__ , proto , name ) ) ; * qlimitp = netisr_proto [ proto ] . np_qlimit ; NETISR_RUNLOCK ( & tracker ) ; }
Query current per-workstream queue limit for a protocol.
Query current per - workstream queue limit for a protocol .