Share via


_interlockedbittestandset64函式 (winnt.h)

測試指定 LONG64 值的指定位,並將其設定為 1。 此作業是不可部分完成的。

語法

BOOLEAN _interlockedbittestandset64(
  [in] LONG64 volatile *Base,
  [in] LONG64          Offset
);

參數

[in] Base

變數的指標。

[in] Offset

要測試的位位置。

傳回值

設定之前所指定位的值。

備註

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

此函式會盡可能使用編譯器內建函式來實作。 如需詳細資訊,請參閱 WinBase.h 標頭檔與 _interlockedbittestandset64

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

規格需求

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

另請參閱

Interlocked Variable Access

InterlockedBitTestAndReset

InterlockedBitTestAndReset64

InterlockedBitTestAndResetAcquire

InterlockedBitTestAndResetRelease

InterlockedBitTestAndSet

InterlockedBitTestAndSetAcquire

InterlockedBitTestAndSetRelease

同步處理函式