Home | History | Annotate | Download | only in libaltq

Lines Matching refs:gsc

759 gsc_add_sc(struct gen_sc *gsc, struct service_curve *sc)
764 gsc_add_seg(gsc, 0, 0, (double)sc->d, (double)sc->m1);
765 gsc_add_seg(gsc, (double)sc->d, 0, HUGE_VAL, (double)sc->m2);
770 gsc_sub_sc(struct gen_sc *gsc, struct service_curve *sc)
775 gsc_sub_seg(gsc, 0, 0, (double)sc->d, (double)sc->m1);
776 gsc_sub_seg(gsc, (double)sc->d, 0, HUGE_VAL, (double)sc->m2);
785 is_gsc_under_sc(struct gen_sc *gsc, struct service_curve *sc)
791 if (LIST_EMPTY(gsc))
793 LIST_FOREACH(s, gsc, _next) {
800 * gsc has a dummy entry at the end with x = HUGE_VAL.
803 end = gsc_getentry(gsc, HUGE_VAL);
807 for (s = LIST_FIRST(gsc); s != end; s = LIST_NEXT(s, _next)) {
826 gsc_destroy(struct gen_sc *gsc)
830 while ((s = LIST_FIRST(gsc)) != NULL) {
838 * if gsc has no entry starting at x, a new entry is created at x.
841 gsc_getentry(struct gen_sc *gsc, double x)
846 LIST_FOREACH(s, gsc, _next) {
870 LIST_INSERT_HEAD(gsc, new, _next);
894 gsc_add_seg(struct gen_sc *gsc, double x, double y, double d, double m)
903 start = gsc_getentry(gsc, x);
904 end = gsc_getentry(gsc, x2);
913 end = gsc_getentry(gsc, HUGE_VAL);
923 gsc_sub_seg(struct gen_sc *gsc, double x, double y, double d, double m)
925 if (gsc_add_seg(gsc, x, y, d, -m) < 0)
927 gsc_compress(gsc);
935 gsc_compress(struct gen_sc *gsc)
940 LIST_FOREACH(s, gsc, _next) {
943 if (LIST_FIRST(gsc) == s && s->m == 0) {