[lkml]   [1996]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: real POSIX.1b semaphores

Ulrich Drepper said this, and I just had to respond:
> One point still not clear is whether it's worth to create a
> pseudo filesystem for the named semaphores. I would vote for it
> and the standard author encourage this use. It would allow easy
> maintenance of the semaphore namespace. Keeping all names in a
> plane namespace (i.e., treating / as a normal character) would
> be simpler but once the semaphores are implemented I would think
> hundreds of semaphores used at the same time is easily possible.
> How do you like a directory with hundreds of entries? The POSIX
> people gave us this mean of structurization so me should use it.

I'm not sure how much leeway ext2 gives us here (not to mention other file
systems), but I think the cleanest solution would be to treat the semaphore
namespace as part of the filesystem, just like FIFOs are. That is, when
you create a named semaphore, it would appear as a special file in the file
system, of type "semaphore". This would require defining a new type of
file, yes, but it seems easier than implementing an entire pseudo file-

The directory information for a "semaphore special" file would just be a
pointer to kernel space indicating where the semaphore structure is.

Robey Pointer | "So that's what an invisible barrier | looks like." -Time Bandits | (join the 90's retro bandwagon early!)

 \ /
  Last update: 2005-03-22 13:38    [W:0.065 / U:21.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site