共用方式為


__load128, __load128_acq

Microsoft Specific

Loads a 128-bit value atomically.

__int64 __load128( 
   __int64 volatile * Source, 
   __int64 *DestinationHigh 
);
__int64 __load128_acq( 
   __int64 volatile * Source, 
   __int64 *DestinationHigh 
);

Parameters

  • [in] Source
    Pointer to the 128-bit source value.

  • [out] DestinationHigh
    Pointer to a memory location where the most significant 64-bit quadword of the 128-bit loaded value is stored.

Return Value

The return value is the least significant quadword of the 128-bit loaded value.

Platforms

Function

Architecture

__load128

IA64

__load128_acq

IA64

Requirements

Header file <intrin.h>

Remarks

The __load128 function performs an atomic 128-bit read from the source memory location. The Source pointer should point to a 16-byte aligned memory location.

These functions are not general purpose 128-bit intrinsics. These functions should only be used if you really need 128-bit atomic loads. You get better performance with regular 64-bit operations.

Note that the intrinsic form of this function has a leading underscore in the name. Also note that these functions are always expanded as intrinsics. That means you might use /Oi or #pragma intrinsic, but it is not required.

The __load128_acq intrinsic function is the same as the corresponding function without the _acq suffix except that the operation is performed with acquire semantics.

In Visual C++ 2005, these functions behave as read-write barriers. For more information, see _ReadWriteBarrier.

See Also

Concepts

Compiler Intrinsics