This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: simple multithread program fails on Cygwin, succeeds on Linux


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]