delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2001/04/14/22:49:48

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com
Message-ID: <001401c0c556$b81ab030$0200a8c0@lifelesswks>
From: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>
To: <cygwin-developers AT cygwin DOT com>
References: <011301c0c3f1$24e92e10$0200a8c0 AT lifelesswks> <20010414224610 DOT A1128 AT redhat DOT com>
Subject: Re: InterlockedExchangePointer & pthread_atfork
Date: Sun, 15 Apr 2001 12:49:39 +1000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-OriginalArrivalTime: 15 Apr 2001 02:42:26.0101 (UTC) FILETIME=[B4B4BE50:01C0C555]

----- Original Message -----
From: "Christopher Faylor" <cgf AT redhat DOT com>
To: <cygwin-developers AT cygwin DOT com>
Sent: Sunday, April 15, 2001 12:46 PM
Subject: Re: InterlockedExchangePointer & pthread_atfork


> On Fri, Apr 13, 2001 at 06:10:02PM +1000, Robert Collins wrote:
> >I have implemented pthread_atfork.
> >
> >The problem is, there's a missing win32 API function:
> >InterlockedExchangePointer.
> >
> >I want to use that rather than InterLockedExchange, because
> >InterlockedExchangePointer is correct code for 64-bit systems (one
less
> >thing to be fixed in the future).
> >
> >I suspect the function is implmented as inline code. How do I go
about
> >getting that code into cygwin? (I'm currently trying to find a
> >non-copyrighted version of it).
> >
> >Alternatively I can just use InterlockedExchange, and leave a FIXME
in
> >the code.
>
> The function doesn't exist in any of the MSVC v6 headers.  I don't
know
> if it is inlined or not but InterlockedExchange isn't and IIRC this
> routine was pretty complicated on windows 95, probably owing to the
> fact that W9x runs on more than just pentiums.
>
> cgf
>

The InterlockedExchangePointer function on 32-bit x86 systems should be
InterlockedExchange with different cast variables. The actual guts and
operations are identical. It's on IA64 (& alpha ?) systems that
different guts are needed. The function is documented at
msdn.microsoft.com, and is probably in the .NET headers. The portability
reference in the doco includes 95 as a target.

For now I've just #defined it'd, and typecast the variables. There's  a
FIXME in the code.

Rob

- Raw text -


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