From owner-freebsd-arch@FreeBSD.ORG Mon Jun 4 16:55:02 2007 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 542ED16A400; Mon, 4 Jun 2007 16:55:02 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 1098413C448; Mon, 4 Jun 2007 16:55:01 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.14.1/8.14.1/NETPLEX) with ESMTP id l54Gt0VC003267; Mon, 4 Jun 2007 12:55:00 -0400 (EDT) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-3.0 (mail.ntplx.net [204.213.176.10]); Mon, 04 Jun 2007 12:55:00 -0400 (EDT) Date: Mon, 4 Jun 2007 12:55:00 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Roman Divacky In-Reply-To: <20070604162430.GA76813@freebsd.org> Message-ID: References: <20070604162430.GA76813@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: arch@freebsd.org Subject: Re: *at family of syscalls in FreeBSD X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2007 16:55:02 -0000 On Mon, 4 Jun 2007, Roman Divacky wrote: > Hi, > > Starting from Linux 2.6.16, there is available so called *at syscalls. For example > openat(), linkat() etc. Those syscalls are used to avoid races in threaded programs > and to implement per-thread CWD. in other words they are usefull. Thats why Linux > implemented them. > > I am currently implementing those in our Linuxulator. As suggested by Robert Watson > I implemented general kern_fooat() functions and wrapped them around those kern_fooat() > functions. It works ok and everything. But I want to introduce native *at syscalls > for FreeBSD binaries. Hence I am here to discuss the API. > > My suggestion: > > use Linux API with some slight naming changes: These are (unless Linux added some new interfaces) defined by POSIX. The API and behavior should be conformant with POSIX. See the POSIX spec for more info: http://www.opengroup.org/onlinepubs/009695399/toc.htm -- DE