vere: track ovum queue depth per i/o driver

This commit is contained in:
Joe Bryan 2020-06-16 15:42:41 -07:00
parent ff142ddbab
commit 755b2f1347
2 changed files with 7 additions and 0 deletions

View File

@ -529,6 +529,7 @@
c3_m nam_m;
c3_o liv_o;
u3_auto_cb io; // XX io_u;
c3_w dep_w;
struct _u3_ovum* ent_u;
struct _u3_ovum* ext_u;
struct _u3_auto* nex_u;

View File

@ -49,6 +49,7 @@ u3_auto_plan(u3_auto* car_u,
egg_u->pre_u = egg_u->nex_u = 0;
car_u->ent_u = car_u->ext_u = egg_u;
car_u->dep_w = 1;
}
else {
egg_u->nex_u = 0;
@ -56,6 +57,7 @@ u3_auto_plan(u3_auto* car_u,
car_u->ent_u->nex_u = egg_u;
car_u->ent_u = egg_u;
car_u->dep_w++;
}
u3_pier_spin(car_u->pir_u);
@ -165,6 +167,8 @@ u3_auto_drop(u3_auto* car_u, u3_ovum* egg_u)
egg_u->nex_u->pre_u = egg_u->pre_u;
}
egg_u->car_u->dep_w--;
// notify driver if not self-caused
//
if ( egg_u->car_u && ( car_u != egg_u->car_u ) ) {
@ -196,9 +200,11 @@ u3_auto_next(u3_auto* car_u, u3_noun* ovo)
if ( egg_u->nex_u ) {
egg_u->nex_u->pre_u = 0;
car_u->ext_u = egg_u->nex_u;
car_u->dep_w--;
}
else {
car_u->ent_u = car_u->ext_u = 0;
car_u->dep_w = 0;
}
egg_u->nex_u = 0;