Date: Thu, 01 Feb 2001 18:46:42 -0800 From: Peter Wemm <peter@netplex.com.au> To: "Soumen Biswas" <soumen.biswas@gte.net> Cc: hackers@FreeBSD.ORG Subject: Re: __syscall Message-ID: <200102020246.f122kgW20364@mobile.wemm.org> In-Reply-To: <005101c08cb5$700949c0$0a01640a@netscaler.com>
next in thread | previous in thread | raw e-mail | index | archive | help
"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 - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au
"All of this is for nothing if we don't go to the stars" - JMS/B5
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102020246.f122kgW20364>
