System::Threading::Interlocked::ExchangeAdd 方法

Interlocked::ExchangeAdd(int32_t&, int32_t) method

通过 exchange-add 过程原子递增值。

static int32_t System::Threading::Interlocked::ExchangeAdd(int32_t &location1, int32_t value)
ParameterType描述
location1int32_t&用于增加的变量引用。
valueint32_t要添加到 location1 的值。

ReturnValue

变量在被增加后立即的值。

另见

Interlocked::ExchangeAdd(int64_t&, int64_t) method

通过 exchange-add 过程原子递增值。

static int64_t System::Threading::Interlocked::ExchangeAdd(int64_t &location1, int64_t value)
ParameterType描述
location1int64_t&用于增加的变量引用。
valueint64_t要添加到 location1 的值。

ReturnValue

变量在被增加后立即的值。

另见