InterlockedXor8 関数 (winnt.h)

指定した char 値に対してアトミック XOR 操作を実行します。 関数は、複数のスレッドが同じ変数を同時に使用できないようにします。

構文

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

パラメーター

[in, out] Destination

最初のオペランドへのポインター。 この値は、操作の結果に置き換えられます。

[in] Value

2 番目のオペランド。

戻り値

関数は Destination パラメーターの元の値を返します。

解説

インターロックされた関数は、複数のスレッドによって共有される変数へのアクセスを同期するための簡単なメカニズムを提供します。 この関数は、他のインターロックされた関数の呼び出しに関してアトミックです。

Intel Itanium ベースのシステムと x64 アーキテクチャの場合、この関数はコンパイラ組み込みを使用して実装されます。 x86 アーキテクチャの場合は、 _InterlockedXor8 コンパイラ組み込みを直接使用します。

この関数は、メモリ操作が順番に完了するように、完全なメモリ バリア (またはフェンス) を生成します。

Itanium ベースのシステム: パフォーマンスが重要なアプリケーションの場合は、代わりに InterlockedXor8Acquire または InterlockedXor8Release を 使用してください。

メモ この関数は、Windows RT ベースのシステムでサポートされています。
 

要件

   
対象プラットフォーム Windows
ヘッダー winnt.h (Windows.h を含む)

関連項目

インタロックされた変数アクセス

InterlockedXor

InterlockedXor16

InterlockedXor16Acquire

InterlockedXor16NoFence

InterlockedXor16Release

InterlockedXor64

InterlockedXor64Acquire

InterlockedXor64NoFence

InterlockedXor64Release

InterlockedXor8Acquire

InterlockedXor8NoFence

InterlockedXor8Release

InterlockedXorAcquire

InterlockedXorNoFence

InterlockedXorRelease

同期関数