[PATCH] Add unsigned long Interlocked functions
Thu Mar 20 01:31:00 GMT 2003
On Thu, Mar 20, 2003 at 10:20:14AM +1100, Robert Collins wrote:
>Looks good to me. Chris, you happy with the winbase stuff?
I am not sure I understand the need for the UL uses since they are
just wrappers around InterlockedIncrement. Why lie about this by
removing the typecasts?
Also, although it has nothing to do with this particular patch, I can
see that some (1 == foo) style conditional tests have crept in. While I
understand why some people like this, this usage is counter to the rest
of cygwin which uses foo == 1.
>On Thu, 2003-03-20 at 00:49, Thomas Pfaff wrote:
>> 2003-03-19 Thomas Pfaff <email@example.com>
>> * thread.cc (pthread_cond::Wait): Remove typecasts for unsigned
>> long values when calling Interlocked functions. Use new UL functions
>> (pthread_mutex::_Lock): Ditto.
>> (pthread_mutex::_TryLock): Ditto.
>> * winbase.h (InterlockedIncrementUL): New inline function for type
>> safety with unsigned parameters.
>> (InterlockedDecrementUL): Ditto.
>> (InterlockedExchangeUL): Ditto.
>> (InterlockedCompareExchangeUL): Ditto.
More information about the Cygwin-patches