InterlockedOr8 関数 (winnt.h)

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

構文

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

パラメーター

[in, out] Destination

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

[in] Value

2 番目のオペランド。

戻り値

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

解説

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

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

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

Itanium ベースのシステム: パフォーマンスクリティカルなアプリケーションの場合は、代わりに InterlockedOr8Acquire または InterlockedOr8Release を使用してください。

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

要件

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

関連項目

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

InterlockedOr

InterlockedOr16

InterlockedOr16Acquire

InterlockedOr16NoFence

InterlockedOr16Release

InterlockedOr64

InterlockedOr64Acquire

InterlockedOr64NoFence

InterlockedOr64Release

InterlockedOr8Acquire

InterlockedOr8NoFence

InterlockedOr8Release

InterlockedOrAcquire

InterlockedOrNoFence

InterlockedOrRelease

同期関数