Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Dec 2002 12:24:46 -0800
From:      Joe Kelsey <joek@mail.flyingcroc.net>
To:        freebsd-current@freebsd.org
Subject:   Posix Semaphores in -CURRENT
Message-ID:  <3DF8F08E.8050809@mail.flyingcroc.net>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3DF8F08E.8050809>