Mail Archives: cygwin/2005/04/08/16:57:55
On Apr 8 17:10, kraken+spam AT smousseland DOT com wrote:
> it works for me too for the testcase i provided last time.
>
> But there is still some issues when you run several semaphore-using
> program at the same time.
[Insert swear-word here]
> to reproduce it :
> -compil last testcase with this modification :
>
> -- if (n_children < 20)
> instead of
> -- if (n_children < 1)
> at the beginning of the main loop
>
> and change
> -- usleep(10)
> to
> -- sleep(1)
> so childs does not disappear too quickly.
>
> -compile it, and copy the binary in another place (like /tmp), so you
> can run two instance of it (as semaphore key is created from the path,
> must have different path).
>
> -then run both of them, you should see
> --semaphore_lock: Identifier removed
> messages, and your semaphores aren't locked.
>
> you can give -r 64 argument to cygserver to be sure that it is not a
> query thread number issue.
Again the thread synchronization was the culprit. I reworked it once
again and I ran your testcase 5 times concurrently with different sleep
values, some in the same, some in different directories. It works for
me again. Please test and tell me that it solves all your problems
and nothing's left, ok?
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader mailto:cygwin AT cygwin DOT com
Red Hat, Inc.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -