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

[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.