Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: MODULAR option and advertised semaphore support

On Sun, Nov 07, 2010 at 10:12:12PM +0200, Jukka Ruohonen wrote:
> On Sat, Nov 06, 2010 at 01:19:31PM +0100, Nicolas Joly wrote:
> > Sure. But availability of a sub-system should not be embedded in the
> > corresponding module. By example, kern.posix_semaphores should always
> > be available, but some semaphore specifics such as kern.posix.semmax
> > which are only meaningfull if supported can be embedded in the module,
> > and thus cleaned-up when unloaded.
> >
> > _SC_SEMAPHORES should return 200112 if semaphores are fully supported,
> > which means syscalls would succeed (from kernel option, loaded module,
> > ...); and -1 (= not supported) otherwise. But it should never fail by
> > lack of status.
> But how can it predict whether or not the corresponding syscall, and the
> loading of the module, will succeed?

You can't, unless you really load the module without error.

> If I manually delete the module (for whatever reason), shouldn't
> this mean that the functionality embedded in the module is no longer
> supported?

Sure. But i would prefer sysconf(3)/sysctl(2) not to report an error
in that case due to missing key.

Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.

Home | Main Index | Thread Index | Old Index