This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: simple multithread program fails on Cygwin, succeeds on Linux
- From: Nicholas Sherlock <n dot sherlock at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 11 Aug 2009 00:32:24 +1200
- Subject: Re: simple multithread program fails on Cygwin, succeeds on Linux
- References: <200908101213.17744.bruno@clisp.org>
Bruno Haible wrote:
Hi,
The attached test program for pthread_once uses the following basic POSIX
threads functions:
pthread_create
pthread_join
pthread_mutex_init
pthread_mutex_lock
pthread_mutex_unlock
pthread_once
pthread_rwlock_init
pthread_rwlock_rdlock
pthread_rwlock_unlock
pthread_rwlock_wrlock
In Cygwin 1.5 there was a bug that meant that you could not lock a
rwlock recursively for read (it would just deadlock on the second
acquire). I didn't study the code for very long, but this might be the
problem you're encountering. In any case, Cygwin 1.7 fixes at least one
problem with rwlocks so it's a good upgrade choice.
Cheers,
Nicholas Sherlock
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple