FreeBSD system call implementation
Peter Pentchev
roam at ringlet.net
Wed Dec 15 08:15:56 PST 2004
On Wed, Dec 15, 2004 at 07:56:53AM -0800, Kamal R. Prasad wrote:
>
> --- Andrey Simonenko <simon at comsys.ntu-kpi.kiev.ua>
> wrote:
>
> > On Wed, Dec 15, 2004 at 08:19:05PM +0530, Ravi
> > Krishna wrote:
> >
> > > My question is why we store the
> > p->p_sysent->sv_table
> > > for each process. What is the reason for keeping
> > this per process?
> > > Are there some situations where two processes can
> > have different system calls
> > > available?
> >
> > Processes can have different p_sysent, because the
> > kernel supports
> > different ABIs. sv_entry (pointer to some system
> > call table) is
>
> Sounds rather inefficient to have a per-process table
> rather than a set of ABIs into which the per process
> table is an indirection (similar to say vnops).
Errrr... actually, if you look at <sys/proc.h>, you'll see that this is
exactly the way it is - p->p_sysent is a *pointer* to a struct sysentvec,
and there are only a few struct sysentvec's in the kernel, definitely not
one per process :)
G'luck,
Peter
--
Peter Pentchev roam at ringlet.net roam at cnsys.bg roam at FreeBSD.org
PGP key: http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553
The rest of this sentence is written in Thailand, on
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20041215/9570ab9f/attachment.bin
More information about the freebsd-hackers
mailing list