Farid Zaripov wrote:
From: Martin Sebor [mailto:[EMAIL PROTECTED]
Sent: Пн, 21.01.2008 18:21
To: [EMAIL PROTECTED]
Subject: Re: [PATCH] _mutex.h
No. _RWSTD_INTERLOCKED_T #defined only for 32-bit compiler, while intrinsic
functions are available in 32 and 64-bit compilers.
Why isn't it defined for the 64-bit compiler? (Because the config
test fails?)
The config test doesn't fails because the determining of the _RWSTD_INTERLOCKED_T
type (ATOMIC_OPS.cpp config test) is guarded by the
#if defined (_WIN32) && !defined (_WIN64) #else #endif. The rason is that
__stdcall InterlockedXXX functiond are present only in Win32 API. The Win64 API
doesn't provides theese functions, but the compiler supports __cdecl
_InterlockedXXX
intrinsic functions and windows.h contains #defines of the InterlockedXXX to
_InterlockedXXX.
It seems that it should be defined regardless, wouldn't
you say? Even if we need to hardcode it _config.h or _defs.h...
Actually the _RWSTD_INTERLOCKED_T define is used only in declaration of the
InterlockedIncrement(),
InterlockedDecrement() and InterlockedExchange() functions in rw/_mutex.h.
But after the my latest patch
these functions are not used, because of using the instrinsic _InterlockedXXX()
functions instead on all supported
compilers on Windows (except gcc/cygwin where are used __rw_atomic_xxx()
functions).
So, _RWSTD_INTERLOCKED_T isn't used for any compiler anymore?
If that's the case, should we just get rid of it?
Martin