KILL [CONNECTION | QUERY] support, part1
Preparation for adding KILL syntax support. Session id changed to uint32 everywhere. Added atomic op. Session id can be acquired before session_alloc(). Added session_alloc_with_id(), which is given a session id number. Worker object has a session_id->SESSION* mapping, not used yet.
This commit is contained in:
@ -26,6 +26,15 @@ int atomic_add(int *variable, int value)
|
||||
#endif
|
||||
}
|
||||
|
||||
uint32_t atomic_add_uint32(uint32_t *variable, int32_t value)
|
||||
{
|
||||
#ifdef MXS_USE_ATOMIC_BUILTINS
|
||||
return __atomic_fetch_add(variable, value, __ATOMIC_SEQ_CST);
|
||||
#else
|
||||
return __sync_fetch_and_add(variable, value);
|
||||
#endif
|
||||
}
|
||||
|
||||
int64_t atomic_add_int64(int64_t *variable, int64_t value)
|
||||
{
|
||||
#ifdef MXS_USE_ATOMIC_BUILTINS
|
||||
|
||||
Reference in New Issue
Block a user