Where the SEM_NSEMS_MAX is defined?

Neil freeordie.k@gmail.com
Tue Feb 7 01:31:00 GMT 2012

Hi Mark,

Thanks for your detailed explanation.

> So, SEM_NSEMS_MAX does not need to be defined on a system where there is
> no limit (such as here). Check sysconf(_SC_SEM_NSEMS_MAX) and the lack
> of limit is confirmed.

In POSIX test suite there is a test case sem_init/7-1.c, it checks
sysconf(_SC_SEM_NSEMS_MAX) and if returns -1, the case return
Do you think it should return PASS? Thanks.

   max = sysconf(_SC_SEM_NSEMS_MAX);

   if (max <= 0)
       output("sysconf(_SC_SEM_NSEMS_MAX) = %ld\n", max);
       UNTESTED("There is no constraint on SEM_NSEMS_MAX");


More information about the Libc-help mailing list