Posted by Marek Simon on 12/18/29 11:51
1st idea. try to aquire semaphore and remove it only if aquire was
succesfull.
2nd idea. prevent creating new semaphores and reuse the old.
Marek
Ratvin napsal(a):
> sem_remove will cause trouble if there are other processes blocking on
> the semaphore. This has already been tried.
>
> Is there any way to remove a semaphore only if there are no processes
> waiting on it?
>
> I mean to say that if there are processes blocking on the sem then
> release the semaphore after use otherwise remove it.
>
> I m in search of the best possible strategy to do this....
>
> Any suggestions?
>
> Thanks
> Ratheesh K J
>
Navigation:
[Reply to this message]
|