Make atomic_load_-functions const correct
This commit is contained in:
parent
3e39ec906e
commit
d68d3072a8
@ -57,10 +57,10 @@ uint64_t atomic_add_uint64(uint64_t *variable, int64_t value);
|
||||
* @param variable Pointer the the variable to load from
|
||||
* @return The stored value
|
||||
*/
|
||||
int atomic_load_int32(int *variable);
|
||||
int64_t atomic_load_int64(int64_t *variable);
|
||||
uint64_t atomic_load_uint64(uint64_t *variable);
|
||||
void* atomic_load_ptr(void **variable);
|
||||
int atomic_load_int32(const int *variable);
|
||||
int64_t atomic_load_int64(const int64_t *variable);
|
||||
uint64_t atomic_load_uint64(const uint64_t *variable);
|
||||
void* atomic_load_ptr(void * const *variable);
|
||||
|
||||
/**
|
||||
* Implementation of an atomic store operation for the GCC environment.
|
||||
|
@ -53,7 +53,7 @@ uint64_t atomic_add_uint64(uint64_t *variable, int64_t value)
|
||||
#endif
|
||||
}
|
||||
|
||||
int atomic_load_int32(int *variable)
|
||||
int atomic_load_int32(const int *variable)
|
||||
{
|
||||
#ifdef MXS_USE_ATOMIC_BUILTINS
|
||||
return __atomic_load_n(variable, __ATOMIC_SEQ_CST);
|
||||
@ -62,7 +62,7 @@ int atomic_load_int32(int *variable)
|
||||
#endif
|
||||
}
|
||||
|
||||
int64_t atomic_load_int64(int64_t *variable)
|
||||
int64_t atomic_load_int64(const int64_t *variable)
|
||||
{
|
||||
#ifdef MXS_USE_ATOMIC_BUILTINS
|
||||
return __atomic_load_n(variable, __ATOMIC_SEQ_CST);
|
||||
@ -71,7 +71,7 @@ int64_t atomic_load_int64(int64_t *variable)
|
||||
#endif
|
||||
}
|
||||
|
||||
uint64_t atomic_load_uint64(uint64_t *variable)
|
||||
uint64_t atomic_load_uint64(const uint64_t *variable)
|
||||
{
|
||||
#ifdef MXS_USE_ATOMIC_BUILTINS
|
||||
return __atomic_load_n(variable, __ATOMIC_SEQ_CST);
|
||||
@ -80,7 +80,7 @@ uint64_t atomic_load_uint64(uint64_t *variable)
|
||||
#endif
|
||||
}
|
||||
|
||||
void* atomic_load_ptr(void **variable)
|
||||
void* atomic_load_ptr(void * const *variable)
|
||||
{
|
||||
#ifdef MXS_USE_ATOMIC_BUILTINS
|
||||
return __atomic_load_n(variable, __ATOMIC_SEQ_CST);
|
||||
|
Loading…
x
Reference in New Issue
Block a user