[PATCH] Interlocked functions

Christopher Faylor cgf@redhat.com
Thu Aug 15 13:29:00 GMT 2002


On Thu, Aug 15, 2002 at 09:38:52PM +0200, Thomas Pfaff wrote:
>
>With my mutex implementation i ran into the problem that the
>InterlockedCompareExchange call ist not available on Win95.
>
>IMHO there exist 3 possibilities:
>
>Do not apply my mutexes :-(
>Drop support for WIN95.
>Create assembler versions of the interlocked functions. Now the code will
>not on run on old i386 machines. This is my favourite solution.
>
>Chris has alreay created inline functions for Interlocked... in winbase.h,
>i have added an ilockcmpexch and converted them into real functions in a
>new file called winbase.c because i had some trouble with O2 optimization
>and the inline functions.

Argh.  So, you lose all of the inline optimization.  It sounds like you
have to play with your implementation some more.

The linux kernel manages to work fine with -O2 optimization.  There is no
reason why we can't do the same.

cgf



More information about the Cygwin-patches mailing list