FreeBSD/sys/geom/sched/gs_rr.c
/*
 * Module glue: allocate descriptor, initialize its fields.
 */
Module glue: allocate descriptor, initialize its fields.
Module glue : allocate descriptor initialize its fields .
static void *
g_rr_init(struct g_geom *geom)
{
	struct g_rr_softc *sc;
	sc = malloc(sizeof *sc, M_GEOM_SCHED, M_NOWAIT | M_ZERO);
	sc->sc_geom = geom;
	TAILQ_INIT(&sc->sc_rr_tailq);
	callout_init(&sc->sc_wait, 1);
	LIST_INSERT_HEAD(&me.sc_head, sc, sc_next);
	me.units++;
	return (sc);
}
static void * g_rr_init ( struct g_geom * geom ) { struct g_rr_softc * sc ; sc = malloc ( sizeof * sc , M_GEOM_SCHED , M_NOWAIT | M_ZERO ) ; sc -> sc_geom = geom ; TAILQ_INIT ( & sc -> sc_rr_tailq ) ; callout_init ( & sc -> sc_wait , 1 ) ; LIST_INSERT_HEAD ( & me . sc_head , sc , sc_next ) ; me . units ++ ; return ( sc ) ; }
Module glue: allocate descriptor, initialize its fields.
Module glue : allocate descriptor initialize its fields .
/* XXX check whether we can sleep */