Does Linux Support XSI Semaphores?

Started by
0 comments, last by MaulingMonkey 18 years, 11 months ago
I have the Linux (and, in this case, glibc) source right here, but it's kind of ambiguous. I see a couple different versions of the functions, one which makes the system call for the functions, like it should, and another that is an ENOSYS-throwing stub. So, which is it?
Advertisement
Google says yes.

I havn't used XSI semaphores myself, but some manpages turn up which appear to support the fact that they work.

That manpage didn't seem to mention what standard(s) semop conforms to, so I asked my own manpage:

panda@industry~$ man semop[ ... ]CONFORMING TO       SVr4, SVID.  SVr4 documents  additional  error  conditions       EINVAL, EFBIG, ENOSPC.[ ... ]


I'm not exactly a *nix standards expert, but unless I'm mistaken, SVID is also known as System V, which is a common IPC standard supported by linux, and I think SVr4 might be SVID's precursor. The fact that man -k semaphore only returns these, and specialized manpages (Qt semaphores, ipcclean which is related to PostgreSQL, and lockfile) leads me to suspect that I'm right.

Also, linux is extremely configurable if you're building from source - it's possible to include or not include support for just about anything. If you're looking directly at the source, you might be looking at the different versions for "compiled in" and "not compiled in", with the ENOSYS stubs being for allowing applications to run without missing symbols, and prehaps fall back to other IPC mechanisms should XSI's fail.

Sorry I can't give a more definitive answer, but I hope this helps :-).

This topic is closed to new replies.

Advertisement