61 static auto compare_exchange(
double& location,
double value,
double comparand)
noexcept -> double;
82 static auto compare_exchange(
void*& location,
void* value,
void* comparand)
noexcept ->
void*;
88 template<
class type_t>
89 static auto compare_exchange(
object& location,
const object& value,
const object& comparand)
noexcept -> type_t {
90 type_t retValue = location;
92 if (location.equals(comparand)) location = value;
101 template<
class type_t>
102 static auto compare_exchange(type_t& location, type_t value, type_t comparand)
noexcept -> type_t {
103 type_t retValue = location;
105 if (location == comparand) location = value;
114 static auto compare_exchange(
float& location,
float value,
float comparand)
noexcept -> float;
132 template<
class type_t>
133 static auto exchange(type_t& location, type_t value) -> type_t {
134 type_t original = location;
143 static auto exchange(
double& location,
double value)
noexcept -> double;
164 static auto exchange(
void*& location,
void* value)
noexcept ->
void*;
169 template<
class type_t>
170 static auto exchange(
object& location,
const object& value)
noexcept -> type_t {
171 type_t original = location;
180 static auto exchange(
float& location,
float value)
noexcept -> float;
Provides atomic operations for variables that are shared by multiple threads.
Definition interlocked.hpp:40
static auto exchange(int64 &location, int64 value) noexcept -> int64
static auto compare_exchange(int32 &location, int32 value, int32 comparand) noexcept -> int32
Compares two 32-bit signed integers for equality and, if they are equal, replaces one of the values.
static auto decrement(int32 &location) noexcept -> int32
Decrements a specified variable and stores the result, as an atomic operation.
static auto add(int32 &location, int32 value) noexcept -> int32
Adds two 32-bit integers and replaces the first integer with the sum, as an atomic operation.
static auto compare_exchange(type_t &location, type_t value, type_t comparand) noexcept -> type_t
Compares two instances of the specified reference type type_t for equality and, if they are equal,...
Definition interlocked.hpp:102
static auto compare_exchange(void *&location, void *value, void *comparand) noexcept -> void *
Compares two platform-specific handles or pointers for equality and, if they are equal,...
static auto increment(int64 &location) noexcept -> int64
Increments a specified variable and stores the result, as an atomic operation.
static auto increment(int32 &location) noexcept -> int32
Increments a specified variable and stores the result, as an atomic operation.
static auto compare_exchange(object &location, const object &value, const object &comparand) noexcept -> type_t
Compares two objects for equality and, if they are equal, replaces one of them.
Definition interlocked.hpp:89
static auto compare_exchange(int64 &location, int64 value, int64 comparand) noexcept -> int64
Compares two 64-bit signed integers for equality and, if they are equal, replaces one of the values.
static auto exchange(object &location, const object &value) noexcept -> type_t
Sets an object to a specified value and returns the original value, as an atomic operation.
Definition interlocked.hpp:170
static auto read(int64 &location) noexcept -> int64
Returns a 64-bit value, loaded as an atomic operation.
static auto exchange(type_t &location, type_t value) -> type_t
Sets a variable of the specified type type_t to a specified value and returns the original value,...
Definition interlocked.hpp:133
static auto exchange(float &location, float value) noexcept -> float
Sets a double-precision floating point number to a specified value and returns the original value,...
static auto exchange(int32 &location, int32 value) noexcept -> int32
Sets a 32-bit signed integer to a specified value and returns the original value, as an atomic operat...
static auto exchange(void *&location, void *value) noexcept -> void *
Sets a platform-specific handles or pointers to a specified value and returns the original value,...
static auto add(int64 &location, int64 value) noexcept -> int64
Adds two 64-bit integers and replaces the first integer with the sum, as an atomic operation.
static auto compare_exchange(float &location, float value, float comparand) noexcept -> float
Compares two Single for equality and, if they are equal, replaces one of the values.
static auto memory_barrier() noexcept -> void
Synchronizes memory access as follows: The processor that executes the current thread cannot reorder ...
static auto decrement(int64 &location) noexcept -> int64
Decrements a specified variable and stores the result, as an atomic operation.
static auto compare_exchange(double &location, double value, double comparand) noexcept -> double
Compares two Double for equality and, if they are equal, replaces one of the values.
static auto exchange(double &location, double value) noexcept -> double
Sets a double-precision floating point number to a specified value and returns the original value,...
Contains core_export_ keyword.
#define static_
This keyword is use to represent a static object. A static object can't be instantiated (constructors...
Definition static.hpp:38
#define core_export_
Define shared library export.
Definition core_export.hpp:13
#define lock_(object)
The lock_ keyword marks a statement block as a critical section by obtaining the mutual-exclusion loc...
Definition lock.hpp:68
std::int64_t int64
Represents a 64-bit signed integer.
Definition int64.hpp:23
__slong__ slong
Represents a 32-bit or 64-bit signed integer.
Definition slong.hpp:27
std::int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
The xtd::threading namespace provides classes and interfaces that enable multithreaded programming....
Definition abandoned_mutex_exception.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::object class.
Contains xtd::static_object class.
Contains xtd fundamental types.