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

Re: [MiNT] Correct way to detect MiNT kernal?



On Fri, 31 Dec 1999 20:09:26 +0100, Thomas Binder wrote:

>Hi!
>
>On Thu, Dec 30, 1999 at 12:06:51PM -0500, Lonny Pursell wrote:
>> Anyway it is related to memory protection.  Back when I was told
>> my program did not function correctly I recoded it to correct this.
>> However, as it turns out the extra bits in the mxalloc() calls
>> caused serious problems on TOS 4.04 without the mint kernal present.
>> Ozk knows this to be true as well.  ;-)
>
>In a German (a non-exported MausNet) discussion group we talked abou
>that problem some time ago and came to the solution Frank already told
>you: If Sysconf(-1) returns anything != -32L, you can safely use memory
>protection flags in calls to Mxalloc(). Of course, that means that
>MagiC, should it ever implement PMMU-based memory protection, must also
>implement that call, then. Andreas Kromke already knows that and agreed
>(maybe because he hasn't got such plans, anyway).
>
>Thus, Sysconf() shouldn't be used to detect the presence of MiNT, but to
>decide whether to use memory protection flags with Mxalloc().

Hey!

Ah.  Ok this is exactly what I have done and it sovled my problems.
Now I see why Frank suggested it.  At the time I did not understand exactly
why it was suggested to do it this way.  Thanks for the background info as it
fills in some gaps.

Can someone maintaining MiNT docs perhaps add this explaination to the
mem-protection docs?  Ozk recently was hit by this same problem
and almost went bald pulling out his hair.  ;-)

__________________________________________________________________
Atari Computer User: Lonny Pursell        E-Mail: atari@bright.net
WWW: http://www.bright.net/~atari/       IRC: lp @ #Atari @ IRCnet