|
From: Luca A. <luc...@em...> - 2003-03-02 11:49:31
|
Hi Juras,
[...]
> Do you mean something like this:
>
> void mytimerhandler()
> {
> if (vm86task)
> {
> // jump to vm86 timer handler through real mode interrupt table
> // by setting VM86 task's CS:IP pointer, pushing flags etc.
> return;
> }
>
> // switch to the next task in the scheduler's queue and
> // handle timer interrupt for 32-bit OS needs
>
> }
Yes, more or less... I don't know if the "jump to vm86 timer handler" part
is needed, hence I'd do something in the line of:
void mytimerhandler()
{
if (<task is vm86>) {
return;
}
<call scheduler and do your usual stuff>
}
> I think this will HALT the task-switching mechanism while a VM86-task is not
> yet finished and paralyze the system...
As I said, I would "play safe", and consider the vm86 task as nonpreemptable (or as the
highest priority task in a fixed priority scheduler).
This will surely have some effects on system latencies, but I don't think it will paralyze the
system. After verifying that this work, you can try more aggressive approaches, like
scheduling the vm86 task.
> But maybe I should handle an interrupt twice, i.e. emulate interrupt for VM86
> task (pushing flags, setting CS:IP...) and handle the interrupt as usual for OS
> needs?
I don't think this is needed.
Luca
--
N O W A R ! ! !
Copy this in your signature if you think it is important
--
Prendi GRATIS l'email universale che... risparmia: http://www.email.it/f
Sponsor:
Vai contro corrente! Inizia a mantenerti in forma da Natale: Oliviero Città dello Sport!
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=1074&d=2-3
|