mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2024-12-28 20:43:36 +01:00
kernel: guarantee availability of drivers based on dependency levels
The question of how to handle a partially-restored world state begs for an elegant symmetrical answer, but that doesn't work unless both kernels do the save/restore for themselves. So far, things have worked out because any order works since interrupts are disabled therefore partially-restored drivers are inactive. However the USB module requires waits that are best performed with timers, so the order cannot be chosen arbitrarily. This commit enforces a gint-centric order where code from a gint driver is only run when all lower-level drivers are active. This solves some pretty bad freezes with the USB module.
This commit is contained in:
parent
18f9a18925
commit
fb8d1525f4
1 changed files with 1 additions and 1 deletions
|
@ -100,7 +100,7 @@ static void drivers_switch(int who)
|
|||
|
||||
/* Restore the other context */
|
||||
ctx_restore(who ? &sys_ctx : &gint_ctx);
|
||||
for driver_asc(d)
|
||||
for driver_dsc(d)
|
||||
{
|
||||
if(!d->ctx_save || !d->ctx_restore) continue;
|
||||
d->ctx_restore(who ? d->sys_ctx : d->gint_ctx);
|
||||
|
|
Loading…
Reference in a new issue