On Mon, 6 Mar 2000, Chris Costello wrote:

> On Monday, March 06, 2000, Zhihui Zhang wrote:
> > Can anyone tell me where is the code for pci_intr_establish() and
> > _thread_sys_read()? I could not find them under /usr/src.
> 
>    I can tell you offhand that _thread_sys_anything is the _real_
> syscall for `anything'.  This is because a lot of syscalls are
> reimplemented within libc_r for reasons that are kind of obvious
> (directly calling the read syscall from one thread would block
> all the other threads in a process).  So _thread_sys_open() ==
> open(2), _thread_sys_read() == read(2), etc.
> 
You are right.  In file libc/i386/SYS.h , you can see the following:

#define PSYSCALL(x)     2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); \
                        ENTRY(__CONCAT(_thread_sys_,x)); \
                        lea __CONCAT(SYS_,x),%eax; KERNCALL; jb 2b

-Zhihui



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to