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