From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 18 11:11:36 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C48410656EA for ; Mon, 18 Oct 2010 11:11:36 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id B44D08FC1E for ; Mon, 18 Oct 2010 11:11:35 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o9IBBV8G049561 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 18 Oct 2010 14:11:31 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o9IBBVBn078402; Mon, 18 Oct 2010 14:11:31 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o9IBBV4o078401; Mon, 18 Oct 2010 14:11:31 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 18 Oct 2010 14:11:31 +0300 From: Kostik Belousov To: Eugene Grosbein Message-ID: <20101018111131.GE2392@deviant.kiev.zoral.com.ua> References: <4CBC2109.4030303@grosbein.pp.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uY1I3j4UW8kglp2S" Content-Disposition: inline In-Reply-To: <4CBC2109.4030303@grosbein.pp.ru> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: hackers@freebsd.org Subject: Re: syscall X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Oct 2010 11:11:36 -0000 --uY1I3j4UW8kglp2S Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 18, 2010 at 05:27:21PM +0700, Eugene Grosbein wrote: > Hi! >=20 > I've written an utility in C that does not link libc normally, > instead it includes and calls syscall(). > It works nice for FreeBSD8/i386. >=20 > Now I'm porting it to FreeBSD8/amd64 and just cannot find > how to call syscall() directly from C code. Show what you tried to do. Syscall() at the C-level works the same (well, almost, but the differences are too subtle for this discussion) for all architectures. >=20 > For arm, i386 and mips there are: >=20 > lib/libc/arm/sys/syscall.S > lib/libc/i386/sys/syscall.S > lib/libc/mips/sys/syscall.S amd64 syscall() wrapper code is autogenerated. >=20 > What about amd64? Indeed, what is your issue with amd64 ? >=20 > Eugene Grosbein >=20 > P.S. Please reply to the list. > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" --uY1I3j4UW8kglp2S Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAky8K2MACgkQC3+MBN1Mb4golQCgnlIWsqHLxukhcm5sD/9OPdmz 7iQAoIC1L5q0Rzd14/eRDRLukbzoXG9q =yGkH -----END PGP SIGNATURE----- --uY1I3j4UW8kglp2S--