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]

Re: [PATCH] Interlocked functions


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


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