Messages in this thread |  | | From | (Robey Pointer) | Subject | Re: real POSIX.1b semaphores | Date | Thu, 21 Nov 1996 15:34:28 -0800 (PST) |
| |
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- system.
The directory information for a "semaphore special" file would just be a pointer to kernel space indicating where the semaphore structure is.
Robey -- Robey Pointer | "So that's what an invisible barrier robey@netcom.com | looks like." -Time Bandits http://www.valuserve.com/~robey | (join the 90's retro bandwagon early!)
|  |