delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/07/17/16:52:54

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:reply-to:from:date:subject:to:message-id; q=
dns; s=default; b=vhVAhZc2rsVkkmaDheaWNfmHobZaytrsoW3MT96Jz962PQ
SApGpmQvgGwLmC9bj/zwJVq4J2m3ffDM1aHSD66kj0OYmWlzBSRibhXaS73I4xCT
zqt068hHhsURsVzVDrgwgNgjdjkt6Q0jC7B/JkKk60uVOYIG0OA9mLM4o7DhY=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:reply-to:from:date:subject:to:message-id; s=
default; bh=oRFcASu6bTzfsPtSiKH2NGxomw0=; b=nzFteImiAsYXAKFx9pip
snx+jFEeYaav+UuS9dw8+cNKtcmJWZk5BKg4xgeB42vtZoipMZWEIs/4lupjyvyc
LcgSZpamuvVktNJ2GjwPfuBPAiIoI0DJZ4O4LtwIW9RbqdtvuMO2ISuVauNA3JwN
ytKm+rLWwIHZVEftsptpYJc=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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
X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_50,TW_YG autolearn=ham version=3.3.1
Reply-To: cygwin AT cygwin DOT com
From: Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
Date: Wed, 17 Jul 2013 16:06:42 -0400
Subject: [ANNOUNCEMENT] Updated: mingw-pthreads-20110507-2
To: cygwin AT cygwin DOT com
Message-Id: <announce.20130717204655.96737680098@frontend2.nyi.mail.srv.osa>

The mingw-pthreads package provides Pthreads-W32, for use with the
MinGW cross toolchain.  Pthreads-W32 provides a POSIX-compliant pthreads
implementation for the Win32 platform.  The MinGW cross toolchain's
libgomp library, which provides openmp support for that compiler, is
linked against pthreadGC2.dll, as provided by this package.

Two versions of Pthreads-W32 are supplied:
  1. pthreadGC2.dll    (C cleanup code)
  2. pthreadGCE2.dll   (C++ cleanup code)
The first version is used by default. To use the GCE version, link
with -lpthreadGCE2 rather than -lpthreadGC or -lpthread.  Note that most
platforms' pthread implementations, even when used with C++, follow
the C cleanup model; that practice is also the recommended procedure in
this case, with the MinGW cross compiler.

To be perfectly clear: most users of the i686-pc-mingw32 cross compiler,
if they desire to exploit pthreads functionality, should use -lpthread
(which is the same as -lpthreadGC) regardless of language: C, C++, 
whatever. Furthermore, if you use the OpenMP (-fopenmp) features of GCC,
then you must link against the "normal" pthreads library, because libgomp
uses that version, and mixing the two versions is illadvised.  Only those
intrepid adventurers willing to brave the wilds of unusual, nay, wildly
unpredictable, behavior should attempt to use the GCE (-lpthreadGCE)
version -- and then, only if they are writing C++ programs.  Read the
pthreads-win32 documentation before experimenting with the C++ version.

The non-standard DLL names are used to match the versions distributed by
upstream Pthreads-W32. The DLLs are compiled using the same options as
the upstream build (e.g. GC-inline, GCE-inline).

There is a kernel mode driver that can be installed to (supposedly)
improve the conformance of Pthreads-W32 with respect to thread
cancellation during windows IO calls. It is available from MinGW.org as
QueueUserAPCEx-install.exe.  This executable is a handy Inno-Setup
installer for the i386, x86_64, and ia64 versions of the driver.
However, it has a number of issues -- not least of which is that I have
NOT found ANY conformance improvement *at all*!

First, the 64bit bit drivers are completely untested.  Second, Windows7
and Server2008 require all kernel mode drivers to be signed by a
certified CA, at least in their 64bit incarnations (I'm not sure about
the 32bit versions).  I don't have a signed certicate with which to sign
the driver -- and am not likely to ever get one.  So, it's a good thing
that libpthread works pretty well even without this driver.

So...that's why the version of Pthreads-W32 which uses C cleanup is used
by default.  For the curious, more information about the alertdrv.sys
driver can be found at the following links:
  http://www.codeproject.com/KB/threads/queueuserapcex.aspx
  http://www.codeproject.com/KB/threads/QueueUserAPCEx_v2.aspx
and the release notes accompanying QueueUserAPCEx-install.exe.

Changes since 20110507-1
========================
* Rebuild as part of mingw-gcc refresh
* Rely on cygport-generated setup.hint
* First cygwin64 build

-- 
Charles Wilson

====================================================================

To update your installation, click on the "Install Cygwin now" link
on the http://cygwin.com/ web page.  This downloads setup.exe to
your system.  Then, run setup and answer all of the questions.

              *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

If you want to unsubscribe from the cygwin-announce mailing list, look
at the "List-Unsubscribe: " tag in the email header of this message.
Send email to the address specified there.  It will be in the format:

cygwin-announce-unsubscribe-you=yourdomain DOT com AT cygwin DOT com

If you need more information on unsubscribing, start reading here:

http://sourceware.org/lists.html#unsubscribe-simple

Please read *all* of the information on unsubscribing that is available
starting at this URL.


--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019