Boost logo

Boost Users :

From: bufo19312 (timothy.fender_at_[hidden])
Date: 2002-07-19 14:51:41


Environment boost_1_28_0, Intel 6.0, target = _WIN64. The
InterlockedIncrement et.al. interfaces in boost/detail/winapi need to
be changed as follows, since they are now intrinsics.

Technically, I suppose the guard should be _M_IA64, rather than
_WIN64, since other target processors+compilers may not support
compiler intrinsics for these interfaces.
 
$ diff -c winapi.hpp winapi_original.hpp
*** winapi.hpp Thu Jul 18 08:11:11 2002
--- winapi_original.hpp Fri Mar 15 16:00:10 2002
***************
*** 55,82 ****
      ulong_ptr_type SpinCount;
  };

- #if defined( _WIN64 )
-
- extern "C" long_type __cdecl _InterlockedIncrement(long_type
volatile *);
- extern "C" long_type __cdecl _InterlockedDecrement(long_type
volatile *);
- extern "C" long_type __cdecl _InterlockedExchange(long_type
volatile *, long_type);
-
- #pragma intrinsic(_InterlockedIncrement)
- #pragma intrinsic(_InterlockedDecrement)
- #pragma intrinsic(_InterlockedExchange)
-
- inline long_type InterlockedIncrement( long_type volatile* lp ) {
return _InterlockedIncrement( lp ); }
- inline long_type InterlockedDecrement( long_type volatile* lp ) {
return _InterlockedDecrement( lp ); }
- inline long_type InterlockedExchange( long_type volatile* lp,
long_type l ) { return _InterlockedExchange( lp, l ); }
-
- #else
-
  extern "C" __declspec(dllimport) long_type __stdcall
InterlockedIncrement(long_type volatile *);
  extern "C" __declspec(dllimport) long_type __stdcall
InterlockedDecrement(long_type volatile *);
  extern "C" __declspec(dllimport) long_type __stdcall
InterlockedExchange(long_type volatile *, long_type);

- #endif
-
  extern "C" __declspec(dllimport) void __stdcall Sleep(dword_type);

  extern "C" __declspec(dllimport) void __stdcall
InitializeCriticalSection(critical_section *);
--- 55,64 ----

Tim Fender


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net