Discussion:
Intterupts and Join
(too old to reply)
Ben Rogers
2005-02-23 15:25:24 UTC
Permalink
Has anyone else had any trouble with interrupts and calling the join
function?

I enable interrupts in spawn right before the call to Read Fully. After
that join fails another assertion that interrupts need to be enabled.
After trying to enable interrupts before calling join it seems to fail
an assertion in the enable interrupts function on the SECOND time trying
to run a program in shell.exe. (All of the programs will run once
correctly, but any time a second program is called, it fails what seems
to be an assertion in Enable_Interrupts)

I am thinking its either something with the interrupts in Sys_Wait, or
something not being cleaned up correctly. It's my understanding that
Destroy User Context has to Free the segment descriptor, memory and the
user context, am I missing something here?
Ben Rogers
2005-02-23 16:34:22 UTC
Permalink
One of the assertions i'm getting says:

Failed assertion in Sys_Wait: !Interrupts_Enabled() at
../src/geekos/syscall.c, line 173, RA=103bf, thread=0x0000a000

But I can't find the assertion statement, in either of those functions,
any suggestions?
Nick Gurganus
2005-02-23 17:16:11 UTC
Permalink
If you try to Enable_Interrupts() when they are already enabled it will throw an
KASSERT error. To fix the Join() function call problem with interrupts I simply
modified Join() before the KASSERT(Interrupts_Enabled()) statement with a if check
and a Enable_Interrupts() if necessary to pass the KASSERT.

Loading...