From owner-freebsd-threads@FreeBSD.ORG Mon Mar 9 12:00:26 2009 Return-Path: Delivered-To: threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DA1A10658F3; Mon, 9 Mar 2009 12:00:25 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 70F3F8FC16; Mon, 9 Mar 2009 12:00:25 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.3/8.14.3/NETPLEX) with ESMTP id n29C0OFp016171; Mon, 9 Mar 2009 08:00:24 -0400 (EDT) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.0 (mail.netplex.net [204.213.176.10]); Mon, 09 Mar 2009 08:00:24 -0400 (EDT) Date: Mon, 9 Mar 2009 08:00:24 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: David Xu In-Reply-To: <49B4B0EF.5080507@freebsd.org> Message-ID: References: <49B480F7.8040800@freebsd.org> <49B4A571.7000302@freebsd.org> <49B4B0EF.5080507@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: threads@freebsd.org, Pawel Worach Subject: Re: libthr does not obey WITHOUT_SYSCALL_COMPAT X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Mar 2009 12:00:27 -0000 On Mon, 9 Mar 2009, David Xu wrote: > Daniel Eischen wrote: >> On Mon, 9 Mar 2009, David Xu wrote: >> >>> I don't know when it appeared. Would this patch eliminate the shit ? >> >> I think so. But I think for future ABI changes to cancellation >> points, wouldn't we need syscall wrappers in libc? Reason, libc >> and libthr are now symbol-versioned, so there will no longer be >> library bumps for ABI changes. But if a syscall is a cancellation >> point and libthr has to play games with it, like fcntl, I think >> there should be a wrapper around it in libc. If the ABI changes, >> then both libc and libthr would need to provide a compat version >> for it. I think. ;-) >> > > Yes, it is better to use versioning instead, I don't know why fcntl_compat is > there without using this feature. Hmm, looking a little closer at this... It looks like there is a wrapper for fcntl in libc (libc/sys/fcntl.c). But I think it should always be built. Currently, it is hidden behind WITHOUT_SYSCALL_COMPAT in libc/sys/Makefile. But it never calls an older fcntl syscall. It just transforms the old style struct into new style, then calls the new fcntl syscall. So I think the mistake is building fcntl.c conditionally, when it should always be built regardless of WITHOUT_SYSCALL_COMPAT being defined or not defined. -- DE