system call library functions

Dow Street <[email protected]>
Newsgroups gmane.os.opendarwin.general
Message-ID <[email protected]>
All,

I am writing some benchmarking code for OS X 10.3.5.  When using 
getpid() to measure the overhead of a system call, I find the overhead 
to be much less than expected (1-3 clicks on the MPC 7447a TBR).  When 
making the call using syscall(20), however, the measurement is as 
expected (~33 clicks on the TBR).  Is getpid actually using a library 
function which retrieves the PID from a user space data structure 
(without entry into the kernel?)  Any idea what / where this function 
is located and the data structure it's accessing?

Thanks,
Dow
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.