Hi,
I am having a problem attempting to initialise semaphores.
I am creating some shared memory for the sem_t structure, then passing the
pointer to this memory to the sem_init function.
The sem_init function is failing with errno 11, Resource temporarily
unavailable. I create 9 semaphores at startup, and all of them fail in the
same way.
What resouces is unavailable? I cannot find any reference to what sem_init
actually does.
The sem_t structure when passed to sem_init is 0 for the value and the
sem_id, and the value is set to 1 after sem_init. The sem_id is still 0.
Hi,
I am having a problem attempting to initialise semaphores.
I am creating some shared memory for the sem_t structure, then passing the
pointer to this memory to the sem_init function.
The sem_init function is failing with errno 11, Resource temporarily
unavailable. I create 9 semaphores at startup, and all of them fail in the
same way.
What resouces is unavailable? I cannot find any reference to what sem_init
actually does.
Proc32 only allows a limitted number of semaphores (for the whole system).
This value is controlled by the -e option to Proc, and defaults to 125.
Have you created 125 semaphores before this point? Or, have you modified
this option to Proc? (“sin args” run as root will give you Proc’s
command line arguments.)
Have you tried the sample semaphore code in /usr/demo/src/semaphores?
Does it run properly?