From owner-freebsd-current Thu Dec 12 12:25: 0 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 25A1C37B401 for ; Thu, 12 Dec 2002 12:24:59 -0800 (PST) Received: from gilliam.users.flyingcroc.net (gilliam.users.flyingcroc.net [207.246.128.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9BC6543EB2 for ; Thu, 12 Dec 2002 12:24:58 -0800 (PST) (envelope-from joek@mail.flyingcroc.net) Received: from mail.flyingcroc.net (zircon.staff.flyingcroc.net [207.246.150.92]) by gilliam.users.flyingcroc.net (8.9.3/8.9.3) with ESMTP id MAA40853 for ; Thu, 12 Dec 2002 12:24:46 -0800 (PST) Message-ID: <3DF8F08E.8050809@mail.flyingcroc.net> Date: Thu, 12 Dec 2002 12:24:46 -0800 From: Joe Kelsey User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.1) Gecko/20021211 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-current@freebsd.org Subject: Posix Semaphores in -CURRENT Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I have been looking at the implementation of POSIX semaphores in -CURRENT. I noticed that there are several missing pieces, specifically the man pages and the removal of uthread_sem.c from libc_r. I suppose the man pages are not critical, but it seems silly to keep uthread_sem.c in libc_r if there is a completely new kernel-based implementation of the sem_* routines in -CURRENT. There are some other things about uipc_sem.c that seem unnecessarily restrictive. For one thing, it *requires* named semaphores to begin with a '/' but not contain embedded '/'. This seems like a severe portabliity issue as TRU64 (at least) allows arbitrary pathnames as sempahores, probably storing some sort of marker in the directories (I get this only from examining the TRU64 online manual pages at http://www.tru64unix.compaq.com/docs/base_doc/DOCUMENTATION/HTML/APS33DTE_html/DOCU_010.HTM There seems to be some broad interpretation of the POSIX semantice in TRU64 to allow for negative semaphore values, one of their questionable choices, although their example code is instructive). Since the semaphore names are merely stored in kernel structures, what difference does it make if they contain embedded '/' characters or not? And why not allow names without leading '/'? I don't think that there is any wording in POSIX preventing this. I would like to take advantage of the posix semaphore implementation when 5.0 comes out. I think the libc_r issue at least needs looking at. Or maybe I misunderstand the reading of src/lib/libc_r/uthread/Makefile HEAD branch. /Joe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message