[PATCH] Interlocked functions

Thomas Pfaff tpfaff@gmx.net
Thu Aug 15 13:00:00 GMT 2002


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.

2002-08-15  Thomas Pfaff  <tpfaff@gmx.net>

	* Makefile.in: Added winbase.o in object file list.
	* winbase.c: New file.
	(ilockincr): New function.
	(ilockdecr): Ditto.
	(ilockexch): Ditto.
	(ilockcmpexch): Ditto.
	* winbase.h: Changed default to use own interlocked functions
	(ilockincr): Removed.
	(ilockdecr): Ditto.
	(ilockexch): Ditto.
	(InterlockedCompareExchange) : New define.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pthread_winbase.patch
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20020815/d6f0f2d3/attachment.ksh>


More information about the Cygwin-patches mailing list