Loading...
Searching...
No Matches
Macros
as_atomic.h File Reference
#include <aerospike/as_atomic_gcc.h>
+ Include dependency graph for as_atomic.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define as_cas_double(_target, _old_value, _new_value)
 
#define as_cas_float(_target, _old_value, _new_value)
 
#define as_cas_ptr(_target, _old_value, _new_value)
 
#define as_fas_double(_target, _value)
 
#define as_fas_float(_target, _value)
 
#define as_fas_ptr(_target, _value)
 
#define as_load_bool(_target)
 
#define as_load_bool_acq(_target)
 
#define as_load_double(_target)
 
#define as_load_float(_target)
 
#define as_store_bool(_target, _value)
 
#define as_store_bool_rls(_target, _value)
 
#define as_store_double(_target, _value)
 
#define as_store_float(_target, _value)
 

Macro Definition Documentation

◆ as_cas_double

#define as_cas_double ( _target,
_old_value,
_new_value )
Value:
({ \
double ov = _old_value; \
double nv = _new_value; \
as_cas_uint64((uint64_t*)_target, *(uint64_t*)&ov, *(uint64_t*)&nv); \
})

Definition at line 117 of file as_atomic.h.

◆ as_cas_float

#define as_cas_float ( _target,
_old_value,
_new_value )
Value:
({ \
float ov = _old_value; \
float nv = _new_value; \
as_cas_uint32((uint32_t*)_target, *(uint32_t*)&ov, *(uint32_t*)&nv); \
})

Definition at line 124 of file as_atomic.h.

◆ as_cas_ptr

#define as_cas_ptr ( _target,
_old_value,
_new_value )
Value:
({ \
as_cas_uint64((uint64_t*)_target, (uint64_t)_old_value, \
(uint64_t)_new_value); \
})

Definition at line 111 of file as_atomic.h.

◆ as_fas_double

#define as_fas_double ( _target,
_value )
Value:
({ \
double nv = _value; \
uint64_t ov = as_fas_uint64((uint64_t*)_target, *(uint64_t*)&nv); \
*(double*)&ov; \
})
#define as_fas_uint64(_target, _value)

Definition at line 92 of file as_atomic.h.

◆ as_fas_float

#define as_fas_float ( _target,
_value )
Value:
({ \
float nv = _value; \
uint32_t ov = as_fas_uint32((uint32_t*)_target, *(uint32_t*)&nv); \
*(float*)&ov; \
})
#define as_fas_uint32(_target, _value)

Definition at line 99 of file as_atomic.h.

◆ as_fas_ptr

#define as_fas_ptr ( _target,
_value )
Value:
({ \
(void*)as_fas_uint64((uint64_t*)_target, (uint64_t)_value); \
})

Definition at line 87 of file as_atomic.h.

◆ as_load_bool

#define as_load_bool ( _target)
Value:
({ \
(bool)as_load_uint8((const uint8_t*)_target); \
})
#define as_load_uint8(_target)

Definition at line 43 of file as_atomic.h.

◆ as_load_bool_acq

#define as_load_bool_acq ( _target)
Value:
({ \
(bool)as_load_uint8_acq((const uint8_t*)_target); \
})
#define as_load_uint8_acq(_target)

Definition at line 49 of file as_atomic.h.

◆ as_load_double

#define as_load_double ( _target)
Value:
({ \
uint64_t v = as_load_uint64((const uint64_t*)_target); \
*(double*)&v; \
})
#define as_load_uint64(_target)

Definition at line 30 of file as_atomic.h.

◆ as_load_float

#define as_load_float ( _target)
Value:
({ \
uint32_t v = as_load_uint32((const uint32_t*)_target); \
*(float*)&v; \
})
#define as_load_uint32(_target)

Definition at line 36 of file as_atomic.h.

◆ as_store_bool

#define as_store_bool ( _target,
_value )
Value:
({ \
as_store_uint8((uint8_t*)_target, (uint8_t)_value); \
})

Definition at line 71 of file as_atomic.h.

◆ as_store_bool_rls

#define as_store_bool_rls ( _target,
_value )
Value:
({ \
as_store_uint8_rls((uint8_t*)_target, (uint8_t)_value); \
})

Definition at line 77 of file as_atomic.h.

◆ as_store_double

#define as_store_double ( _target,
_value )
Value:
({ \
double v = _value; \
as_store_uint64((uint64_t*)_target, *(uint64_t*)&v); \
})

Definition at line 58 of file as_atomic.h.

◆ as_store_float

#define as_store_float ( _target,
_value )
Value:
({ \
float v = _value; \
as_store_uint32((uint32_t*)_target, *(uint32_t*)&v); \
})

Definition at line 64 of file as_atomic.h.