This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Interlocked functions


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.

Attachment: pthread_winbase.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]