14 Commits

Author SHA1 Message Date
MassimilianoPinto
086e7abe77 CentOS 6 compile issues fixed
CentOS 6 compile issues fixed
2017-06-30 10:45:30 +02:00
Johan Wikman
d68d3072a8 Make atomic_load_-functions const correct 2017-06-19 14:37:20 +03:00
Johan Wikman
f546a17e77 Update change date of 2.2 2017-06-01 10:24:20 +03:00
Markus Mäkelä
5c512a3945 Fix atomic code for pre-4.7 GCC versions
The CAS operation used the wrong function and the atomic_store operations
compiled into inadequate assembly on x86 and ARMv7.
2017-05-26 09:57:01 +03:00
Markus Mäkelä
c7cffa0722 Add atomic compare-and-swap
The atomic compare-and-swap can be used to implement lock-free
structures. The planned use for this is to remove some of the locking done
in the services when listeners are being manipulated.
2017-05-09 15:28:04 +03:00
Markus Mäkelä
5dc49a59be Fix build failures on CentOS 6
The older C++ compiler doesn't support struct initialization with explicit
values. In addition to this, fixed a few other warnings that caused
errors.
2017-05-05 19:59:36 +03:00
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