Lines Matching defs:gsc
372 struct g_sched_class *gsc;
380 LIST_FOREACH(gsc, bucket, gsc_clist) {
381 if (key == gsc->gsc_key) {
382 gsc->gsc_refs++;
383 return (gsc->gsc_priv);
388 gsc = malloc(sizeof(*gsc) + gsp->gs_priv_size,
390 if (!gsc)
393 if (gsp->gs_init_class(sc->sc_data, gsc->gsc_priv)) {
394 free(gsc, M_GEOM_SCHED);
398 gsc->gsc_refs = 2; /* 1 for the hash table, 1 for the caller. */
399 gsc->gsc_key = key;
400 LIST_INSERT_HEAD(bucket, gsc, gsc_clist);
402 gsc->gsc_expire = ticks + me.gs_expire_secs * hz;
404 return (gsc->gsc_priv);
413 struct g_sched_class *gsc;
416 gsc = g_sched_priv2class(priv);
417 gsc->gsc_expire = ticks + me.gs_expire_secs * hz;
419 if (--gsc->gsc_refs > 0)
425 LIST_REMOVE(gsc, gsc_clist);
426 free(gsc, M_GEOM_SCHED);