FreeBSD/sys/geom/sched/gs_rr.c
/*
 * Callout executed when a queue times out anticipating a new request.
 */
Callout executed when a queue times out anticipating a new request.
Callout executed when a queue times out anticipating a new request .
static void
g_rr_wait_timeout(void *data)
{
	struct g_rr_softc *sc = data;
	struct g_geom *geom = sc->sc_geom;
	g_sched_lock(geom);
	if (sc->sc_active != NULL) {
		g_rr_queue_put(sc->sc_active);
		sc->sc_active = NULL;
		me.wait_hit--;
		me.wait_miss++;	
	}
	g_sched_dispatch(geom);
	g_sched_unlock(geom);
}
static void g_rr_wait_timeout ( void * data ) { struct g_rr_softc * sc = data ; struct g_geom * geom = sc -> sc_geom ; g_sched_lock ( geom ) ; if ( sc -> sc_active != NULL ) { g_rr_queue_put ( sc -> sc_active ) ; sc -> sc_active = NULL ; me . wait_hit -- ; me . wait_miss ++ ; } g_sched_dispatch ( geom ) ; g_sched_unlock ( geom ) ; }
Callout executed when a queue times out anticipating a new request.
Callout executed when a queue times out anticipating a new request .
/*
	 * We can race with other events, so check if
	 * sc_active is still valid.
	 */ /* Release the reference to the queue. */ /* record the miss */