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

RE: [MiNT] Proposal for SLB extension



I must admit that (not looking at the source) it is unclear to me why
passing the basepage address of the current process actually is that
expensive... It's in the PROC structure anyway, correct?

-----Original Message-----
From: owner-mint@fishpool.com [mailto:owner-mint@fishpool.com]On Behalf
Of Konrad M. Kokoszkiewicz
Sent: Tuesday, April 04, 2000 8:14 PM
To: MiNT mailing list
Subject: [MiNT] Proposal for SLB extension


Hi,

after playing a bit with SLB stuff, I have such an idea. Namely, the
library functions are defined so that they get the basepage address of the
calling program as the first argument. Despite the fact, that under MiNT
this imposes a lot of overhead to actually create this parameter each time
the library is called, yet the argument is pretty useless for most
purposes.

The SLB header contains a 'flags' longword which is, I assume, curently
undefined and must be zero. So what about defining two least significant
bits in it, in the following manner:

bit 0: if 1, the function gets caller's pid instead of the basepage
       address as the first argument.
bit 1: if 1, the bit 0 state is ignored and empty longword is passed
       to the library functions (instead of the basepage address).

Notice that this has an advantage of greatly reducing the aforementioned
lib call overhead (to almost none in the latter case) and if a lib
function wants to have the basepage address (or pid) it still can retrieve
that from the system the standard way (i.e. via /proc).

Opinions?

--
Konrad M.Kokoszkiewicz
mail: draco@atari.org
http://www.obta.uw.edu.pl/~draco/
http://draco.atari.org

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