delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS |
X-Spam-Check-By: | sourceware.org |
To: | cygwin AT cygwin DOT com |
From: | Nicholas Sherlock <n DOT sherlock AT gmail DOT com> |
Subject: | Re: simple multithread program fails on Cygwin, succeeds on Linux |
Date: | Tue, 11 Aug 2009 00:32:24 +1200 |
Lines: | 24 |
Message-ID: | <h5p40q$25c$1@ger.gmane.org> |
References: | <200908101213 DOT 17744 DOT bruno AT clisp DOT org> |
Mime-Version: | 1.0 |
User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8) Gecko/20051201 Thunderbird/1.5 Mnenhy/0.7.3.0 |
In-Reply-To: | <200908101213.17744.bruno@clisp.org> |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |