This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
Re: consistent version of Interlocked* functions
- From: "Robert Collins" <robert dot collins at itdomain dot com dot au>
- To: <cygwin-developers at cygwin dot com>
- Date: Tue, 27 Nov 2001 15:48:14 +1100
- Subject: Re: consistent version of Interlocked* functions
- References: <20011127014725.GA13222@redhat.com>
[Get raw message]
----- Original Message -----
From: "Christopher Faylor" <cgf@redhat.com>
To: <cygwin-developers@cygwin.com>
Sent: Tuesday, November 27, 2001 12:47 PM
Subject: consistent version of Interlocked* functions
> A while ago, I wrote (or acquired -- can't remember exactly) some inline
> assembly versions of the Interlocked* functions but never ended up
> adding them to cygwin.
>
> It occurred to me today that I should dust these off again and use them
> in the cygwin source. Why? In addition to the fact that they should be
> faster than the ones available from the library, they also are
> consistent on all versions of Windows. I.e., the value returned by
> InterlockedIncrement is the incremented value, not some random value
> with the same sign as the value.
>
> The only thing I'm not sure about is if there is a corner case that I
> missed. Everything works fine "for me" but you never know...
>
> The functions are below.
>
> Are there any objections to my using these? Robert? The thread code
> would be the most affected, of course.
I'll do a little research and get back to you.
Rob