winnt.h (interlockedXor8 函式)

在指定的 char 值上執行不可部分完成的 XOR 作業。 函式會防止多個執行緒同時使用相同的變數。

語法

char InterlockedXor8(
  [in, out] char volatile *Destination,
  [in]      char          Value
);

參數

[in, out] Destination

第一個運算元的指標。 此值將會取代為作業的結果。

[in] Value

第二個運算元。

傳回值

函式會傳回 Destination 參數的原始值。

備註

連結函式提供簡單的機制,可同步存取多個執行緒所共用的變數。 此函式與呼叫其他相互連結函式有關,是不可部分完成的。

針對 Intel Itanium 型系統和 x64 架構,此函式是使用編譯器內建函式來實作。 針對 x86 架構,請直接使用 _InterlockedXor8 編譯器內建。

此函式會產生完整記憶體屏障 (或柵欄) ,以確保記憶體作業依序完成。

Itanium 型系統: 對於效能關鍵性應用程式,請改用 InterlockedXor8AcquireInterlockedXor8Release

注意 Windows RT 型系統上支援此函式。
 

規格需求

   
目標平台 Windows
標頭 winnt.h (包括 Windows.h)

另請參閱

相互鎖定的變數存取

InterlockedXor

InterlockedXor16

InterlockedXor16Acquire

InterlockedXor16NoFence

InterlockedXor16Release

InterlockedXor64

InterlockedXor64Acquire

InterlockedXor64NoFence

InterlockedXor64Release

InterlockedXor8Acquire

InterlockedXor8NoFence

InterlockedXor8Release

InterlockedXorAcquire

InterlockedXorNoFence

InterlockedXorRelease

同步處理函式