This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: Where the SEM_NSEMS_MAX is defined?
- From: Neil <freeordie dot k at gmail dot com>
- To: libc-help <libc-help at sourceware dot org>
- Date: Thu, 2 Feb 2012 16:05:46 +0800
- Subject: Re: Where the SEM_NSEMS_MAX is defined?
- References: <CAM-JBkHvxyE-9YwgRB7oV4AL+aw0=C=uQ-GfHa93QCnF=2xHog@mail.gmail.com>
Hi All,
When I read sem_init manual in ÂPOSIX specification, there is a return
value ENOSPC, which means
Â[ENOSPC] A resource required to initialize the semaphore has been
exhausted, or the
    limit on semaphores ({SEM_NSEMS_MAX}) has been reached.
But in nptl/sem_init.c, __new_sem_init() doesn't check the resource
limits. Why it doesn't check and why the implement doesn't in
according with POSIX spec?
And who should define the const SEM_NSEMS_MAX on linux, kernel or libc?
Thanks a lot.
--
Regards,
Neil