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

[MiNT] pid on bp



Hi,

what about reserving the longword p_unused[0] on the process' basepage for
process' pid? I would find it useful for some SLBs. Namely, SLB functions
are given basepage address of the calling process, which is mostly useless
(but not completely useless, to be said). For complex libs the pid is much
more useful, but calling Pgetpid() at the begin of each function adds a
big overhead to them. So I thought it could be useful, if the SLB's open()
function could store caller's pid there (in bp->p_unused[0]) when
necessary for use in user functions of the SLB.

Of course, this would prevent opening the same SLB both by parent process
and the child created by Pfork(), but I feels it does not work anyways.

--
Konrad M.Kokoszkiewicz
mail: draco@atari.org
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.