"Soumen Biswas" wrote:
> Hello, 
> 
> What  exactly is the difference between syscall  &  __syscall ? 

syscall() and __syscall() are pseudo-syscalls.  They take arguments
and evaluate them as though they were real syscalls.  You can see the code
in sys/i386/i386/trap.c.  __syscall() has 64 bit aligned arguments.

> And in 
> 
> in kern/init_sysent.c 
> 
>   struct sysent sysent[] = {
>   /* ..... */
>  { 3, accept},      
>   /*.......*/
> }
> 
> what does 3 denote ?
> 
> I believe it's the total size of all the arguments  in 32 bit words 

Correct.  In sizeof(register_t) units.  For things that have a 64 bit
argument (eg: lseek()), the off_t counts as two arguments.

> soumen

Cheers,
-Peter
--
Peter Wemm - [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
"All of this is for nothing if we don't go to the stars" - JMS/B5



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

Reply via email to