[Prev][Next][Index][Thread]
Re: Why this code doesn't work?
I put a Task gate in IDT table according to timer interrupts. so when
timer interrupt arrive, interrupt task start to running, in my code it is
SHARIF_TSS_2.
osenv_intr_disable();
fill_gate(&base_idt[irq_master_base + 0], 0, SHARIF_TSS_2,
ACC_TASK_GATE | ACC_PL_K, 0);
pit_init(100);
osenv_irq_enable(0);
osenv_intr_enable();
SHARIF_TSS_2 setup so that when interrupt arrived, scheduler start to
running. because
scheduler_tss1.eip = (long)&scheduler;
in scheduler if I just run "iret", it return to where interrupt occured,
and it is following loop.
while (1) {
delay();
printf("Main program \n");
}
But I change scheduler_tss1.back_link so that instead of return to main
task, it return to SHARIF_TSS. next time I change scheduler_tss1.back_link
to BASE_TSS so that I return to main task, and this senario continue.
-----------------
I think you can run this code in oskit, it works. but not for USERs
tasks.
if you want necessary Makefile, I can send you, but you can get them
from oskit examples and change them.
With Regards,
--taghi
On Sat, 29 Jan 2000, Voon-Li Chung wrote:
> Could you send an explaination of how all the code works? Just glancing at
> it makes me think that your stacks for each TSS aren't setup properly for
> starters.
>
> Secondly, where does the timer interrupt handler get attached to the
> event?
>
> Hope this helps.
>
> Thesis Defense Don'ts number 107: "I don't know - I didn't write this."
> ______________________________________________________________
> | Voon-Li Chung | Star Trek Fan, UWA PhD Student, |
> | vlchung@cs.uwa.edu.au | Babylon 5 Fan. TheatreSports Player |
> | Web Page: http://www.cs.uwa.edu.au/~vlchung |
> --------------------------------------------------------------
>
>
Follow-Ups:
References: