InterlockedCompareExchange(3w)

InterlockedCompareExchange3w

Usage

LONG InterlockedCompareExchange
(
LONG volatile* dest,
LONG xchg,
LONG compare
)

Overview

Atomically swap one value with another.

Params

dest [In/Out] The value to replace.

xchq [In] The value to be swapped.

compare [In] The value to compare to dest.

Returns

The resulting value of dest.

Notes

dest is updated only if it is equal to compare, otherwise no swap is done.

Implementation

Defined in "winbase.h".

Implemented in "dlls/kernel32/sync.c".

Debug channel "sync".

Releases

3 releases since Debian 4.0 (Etch); the text changed 2 times.

  1. 4.0
  2. 5.0
  3. 6.0

From libwine-dev 1.0.1-3.1 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.