[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] DATE/TIME cookies



> OK, so what if FreeMiNT allocated two word blocks in a global memory and
> ´mirrored´ the internal datestamp and timestamp variables into those
> vars in global memory? By mirroring I mean that routines updating date
> and timestamp would also update the mirrored_global_dateandtimestamp.
> And of course the ´DATE´ and ´TIME´ cookies would point to the global
> blocks.

Two problems:

1) (Julian already pointed it out) internal date and timestamp of MiNT
   must be in TOS format. Which won't be the case, the internal
   implementation of timekeeping variables is currently changing.
   So it would have been rather emulation, than mirroring.

2) Constant updates of these areas would require introducing
   more stuff to MiNT interrupt services, and that stuff would
   increase kernels overhead even if the user does not want to
   use DATE and TIME cookies and related stuff.
 
> A real reentrancy for (some?) GEMDOS calls would be better (even if I
> had to check the MiNT version before calling the GEMDOS from interrupt -
> heh, this could be a good reason to dump the FreeMiNT version from 1.15.x
> straight to 2.0 so we could document "FreeMiNT since v2.0 allows calling
> GEMDOS from interrupts" :-)

The real problem is that calling MiNT from interrupt (whether MiNT is
reentrant or not) would greatly increase system load, because the routine
that is hooked onto traps is _really_ time consuming. So even if MiNT is
reentrant, calling it 200 times per second is not a completely sane idea.

--
Konrad M.Kokoszkiewicz
|mail: draco@mi.com.pl                  | Atari Falcon030/TT030/65XE |
|http://www.obta.uw.edu.pl/~draco/
|http://draco.atari.org

** Ea natura multitudinis est,
** aut servit humiliter, aut superbe dominatur (Liv. XXIV,25)
*************************************************************
** U pospolstwa normalne jest, ze albo sluzy ono unizenie,
** albo bezczelnie sie panoszy.