[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [MiNT] Proposal for SLB extension (reposted)
> 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?
OK,
I was thinking of getting rid of the getpid option. If an SLB actually *is*
interested in the caller's PID, it can easily find it with the same GEMDOS
call that the dispatcher would need to do...