ExchangeAdd()

Interlocked::ExchangeAdd(int32_t&, int32_t) method

Increases value atomically via exchange-add procedure.

static int32_t System::Threading::Interlocked::ExchangeAdd(int32_t &location1, int32_t value)

Arguments

ParameterTypeDescription
location1int32_t&Variable reference to increase.
valueint32_tValue to add to location1.

Return Value

Value of variable right after it was increased.

Interlocked::ExchangeAdd(int64_t&, int64_t) method

Increases value atomically via exchange-add procedure.

static int64_t System::Threading::Interlocked::ExchangeAdd(int64_t &location1, int64_t value)

Arguments

ParameterTypeDescription
location1int64_t&Variable reference to increase.
valueint64_tValue to add to location1.

Return Value

Value of variable right after it was increased.

See Also