Windows implementation of the Atomics OS functions
更多...
#include <WindowsPlatformAtomics.h>
|
| static void | HandleAtomicsFailure (const TCHAR *InFormat,...) |
| | Handles atomics function failure. 更多...
|
| |
| static bool | IsAligned (const volatile void *Ptr, const uint32 Alignment=sizeof(void *)) |
| | Checks if a pointer is aligned and can be used with atomic functions. 更多...
|
| |
Windows implementation of the Atomics OS functions
◆ CanUseCompareExchange128()
| static FORCEINLINE bool FWindowsPlatformAtomics::CanUseCompareExchange128 |
( |
| ) |
|
|
inlinestatic |
- 返回
- true, if the processor we are running on can execute compare and exchange 128-bit operation.
- 参见
- cmpxchg16b, early AMD64 processors don't support this operation.
◆ HandleAtomicsFailure()
| static void FWindowsPlatformAtomics::HandleAtomicsFailure |
( |
const TCHAR * |
InFormat, |
|
|
|
... |
|
) |
| |
|
staticprotected |
Handles atomics function failure.
Since 'check' has not yet been declared here we need to call external function to use it.
- 参数
-
| InFormat | - The string format string. |
◆ InterlockedCompareExchangePointer()
| static FORCEINLINE void * FWindowsPlatformAtomics::InterlockedCompareExchangePointer |
( |
void *volatile * |
Dest, |
|
|
void * |
Exchange, |
|
|
void * |
Comparand |
|
) |
| |
|
inlinestatic |
The function compares the Destination value with the Comparand value:
- If the Destination value is equal to the Comparand value, the Exchange value is stored in the address specified by Destination,
- Otherwise, the initial value of the Destination parameter is stored in the address specified specified by Comparand.
- 返回
- true if Comparand equals the original value of the Destination parameter, or false if Comparand does not equal the original value of the Destination parameter.
Early AMD64 processors lacked the CMPXCHG16B instruction. To determine whether the processor supports this operation, call the IsProcessorFeaturePresent function with PF_COMPARE64_EXCHANGE128.
该结构体的文档由以下文件生成: