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!)