delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
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 |
MIME-Version: | 1.0 |
Subject: | PTHREAD_MUTEX_DEFAULT different for cygwin v.s. linux. |
Date: | Wed, 8 Jun 2005 17:59:08 -0400 |
Message-ID: | <CA96D22FEF0C7B43AC813F3A1DE435D02CEC98@SERVER.CTCHOME.COM> |
From: | "Thomas E. Zerucha" <tezerucha AT CTCHOME DOT com> |
To: | <cygwin AT cygwin DOT com> |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id j58LxPFh021844 |
I have a problem similar to that of: http://sourceware.org/ml/cygwin/2005-05/msg01400.html I have an old system that I'm trying to port that uses pthreads, but doesn't set the attribute, and a non-owner thread will destroy the thread in a deallocate routine, but this won't happen (it won't actually destroy the thread). The problem is that (in pthread.h) PTHREAD_MUTEX_DEFAULT is .._NORMAL on linux, the system was originally written for. It works but eventually dies when it runs out of threads or mutexes or something since it can't recycle. PTHREAD_MUTEX_DEFAULT is .._ERRORCHECK on cygwin. It would be painful to add a whole section to create an attribute structure just to set this to be the same as linux. I can't seem to build the cygwin1.dll so I could replace it (are there any instructions on how to create an identical copy to the release? I didn't see any on the FAQ, and ./configure;make generates a file 8x larger, and it complained about something with the address). I think just changing it in the pthread.h and recompiling the dll will fix it. Note that the attribute is invisible since you need not bother with the attr structure and parameter when doing defaults. -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |