8 Commits

Author SHA1 Message Date
Markus Mäkelä
a4e361b5e5 Add atomic load/store operations on pointers
Added atomic operations on pointers. Also removed extra return statements
on void functions.
2017-05-04 09:17:48 +03:00
Esa Korhonen
bfd94c2b31 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.
2017-05-02 10:29:55 +03:00
Markus Mäkelä
ab33f05f7a Use correct __atomic builtins for atomic_add
The atomic_add function should return the old value.
2017-04-28 16:27:20 +03:00
Markus Mäkelä
601976dede Use __atomic builtins only where they are supported
Use the newer __atomic builtins only with GCC >= 4.7. The older __sync
builtins are used elsewhere.
2017-04-28 14:53:37 +03:00
Markus Mäkelä
19cf8c489e Rename atomic store and load functions
The atomic store and load functions are now called atomic_store_X and
atomic_load_X where X is one of int32, int64 or uint64.
2017-04-24 16:11:34 +03:00
Markus Mäkelä
122337569c Add atomic store and load operations
Added abstractions for storing and loading 32-bit and 64-bit values
atomically. The functions currently use the GCC __atomic builtin atomics.
2017-04-24 15:58:28 +03:00
Markus Mäkelä
ad1c05b015 Merge branch '2.1' into develop 2017-04-05 11:35:13 +03:00
Johan Wikman
462b572600 Compile atomic.c as C++ 2017-03-24 09:21:20 +02:00