[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MiNT] MetaDOS compatibility broken (fwd)
Hi Julian!
JR>In general I see lots of areas where MiNT could be improved which
JR>would have a much higher priority -- like shared libraries (see remark
JR>above), virtual memory or reentrant dispatchers ultimately leading to
JR>background I/O.
I started to make the GEMDOS dispatcher reentrant (based on Draco's try) some
time ago and it was integrated in 1.15.1 Beta 1.3. Frank removed it (and
other patches) because on some machines (centurbo?) there appeared some
problems with this beta (of which I think they were not related to the new
dispatcher).
IIRC it shall be reintegrated in one of the next betas
My version of the handler is still included as syscall.spp.joerg. Replace
syscall.spp by this file and change the #if 0 in syscall.h to #if 1 to change
the binding of the ROM_* calls. This should result in a dispatcher with the
same behaviour as the current one but calls to the ROM will not go through
the whole GEMDOS chain, they will start directly behind MiNT.
To enable reentrance (which is tested only a little bit!) you have to add
-DREENTRANT to the DEFAULTDEFS in the Makefile. By doing so the blocking
check for reentrance is replaced by outputing an alert message if reentrance
occurs.
*ATTENTION:*
If you have done the above changes _and_ if you define REENTRANT _and_
reentrance occurs this may lead to an unpredictable result!
AFAIK none of the functions is yet tested if it is reentrant!
So no one can tell you what will happen!
So I strongly recommend that you insert the line
bra jump_to_rom_gemdos
right before the label 'after_reentrance_check:' (this will be a part of the
next diff, related to the dispatcher, that Frank will get from me).
In case of reentrance you will then get the alert message and the call will
be forwarded to the next programm in the GEMDOS chain (so the kernel will not
be entered again). This should work as well as without REENTRANT defined but
you will get the reentrance message.
This message will be
"### Reentrance! %lx %d"
where %lx will be replaced by the return address of the call and %d by the
number of the GEMDOS function called from "inside" the kernel
So far I discovered only calls of Cconws() from the mint.cnf parser being
reported by the reentrance check. These should be replaced by direct calls to
c_conws(), the kernel internal function
Bye
Joerg