Subject: Re: build aborts in regress/lib/libpthread/sem
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
From: Marcus Comstedt <marcus@mc.pp.se>
List: port-dreamcast
Date: 02/13/2003 15:11:51
Izumi Tsutsui <tsutsui@ceres.dti.ne.jp> writes:

> Hmm, but is it really Ok to block all exceptions?
> I don't think TLB miss or illegal instruction could be blocked.
> (Then exception during _cpu_exception_suspend() would cause reboot?)

If there is an illegal instruction of TLB miss in the code contained
in the critical section, then that code has to be fixed.  It's true
that exception suspension means reboot if an exception is triggered
anyway, but then at least we'll notice that the exception is there and
needs to be fixed.  If exceptions were allowed, the normal TLB handler
would be run and the forbidden condition would not be detected.  If
there is a way to make the exception handler do a kernel panic
_regardless of which exception it was_, then we could use it instead.
But to continue running is not safe.


> The old enable_intr() didn't restore the previous SR.BL.

Nope, but it ought to have.  And it seems the new interface provides a
convenient way to do it as well.


> I guess uch just replaced both old macros with the new functions
> which did the same things..

Looks like it, yes.


  // Marcus