From owner-freebsd-hackers Thu Feb 1 18:47: 1 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mobile.wemm.org (c1315225-a.plstn1.sfba.home.com [65.0.135.147]) by hub.freebsd.org (Postfix) with ESMTP id 7E49C37B491 for ; Thu, 1 Feb 2001 18:46:44 -0800 (PST) Received: from netplex.com.au (localhost [127.0.0.1]) by mobile.wemm.org (8.11.1/8.11.1) with ESMTP id f122kgW20364; Thu, 1 Feb 2001 18:46:42 -0800 (PST) (envelope-from peter@netplex.com.au) Message-Id: <200102020246.f122kgW20364@mobile.wemm.org> X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 To: "Soumen Biswas" Cc: hackers@FreeBSD.ORG Subject: Re: __syscall In-Reply-To: <005101c08cb5$700949c0$0a01640a@netscaler.com> Date: Thu, 01 Feb 2001 18:46:42 -0800 From: Peter Wemm Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "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