Patrick Pelissier
4642e0b506
Workaround issue of stdatomic on MSYS2/GCC
2019-01-05 00:19:09 +01:00
Patrick Pelissier
60f1454550
Fix incorrect qualifier position for emulation layer (issue for atomic pointer definition)
2019-01-02 22:15:47 +01:00
Patrick Pelissier
8b3a4a802c
Happy new year!
2019-01-02 18:12:07 +01:00
Patrick Pelissier
48a970ceb9
Avoid using '__' within words.
...
It seems to be a reserved naming of C++.
2018-08-19 11:31:09 +02:00
Patrick Pelissier
96202aa78f
Do not use reserved identifiers of the C standard (See 7.1.3 Reserved identifiers)
2018-07-14 14:35:14 +02:00
Patrick Pelissier
b1597f6f61
Rewrite comments.
2018-05-02 23:57:24 +02:00
Patrick Pelissier
7fa1c2264e
Fix issue for C++ layer (memory order constants have to be put in the current namespace too).
2018-04-20 19:34:22 +02:00
Patrick Pelissier
928d6bafcb
Fix issue if there is no working stdatomic / atomic header:
...
definition of atomic_compare_exchange_strong_explicit was wrong.
Same for atomic_compare_exchange_weak_explicit
2018-04-19 22:14:16 +02:00
Patrick Pelissier
7082a4dc24
Fix wrong initialization of ATOMIC_VAR_INIT for the emulation layer
...
(wrong since the simplication of the atomic structure).
2018-03-31 10:04:41 +02:00
Patrick Pelissier
210e05f7fc
Update copyright to 2018
2018-01-29 20:28:30 +01:00
Patrick Pelissier
2e5ca1cc1f
Fix issue when atomic_store is called with atomic_load and
...
there was locks.
the lock taking of atomic_load was performed within the lock
of atomic_store, performing a dead lock.
Fix this by perfoming an evaluation of val before setting
it in atomic_store.
2017-12-28 13:55:13 +01:00
Patrick Pelissier
217c31d6a7
Optimization for the atomic layer with locks:
...
do not perform any lock for amd64 (and x86) architecture
if the word length is less than 8 bytes (or 4 bytes)
as the targeted architecture support it directly.
(strong order)
2017-12-28 13:37:37 +01:00
Patrick Pelissier
985870452c
Remove field _cmp
2017-12-28 12:00:37 +01:00
Patrick Pelissier
55156d2f12
Update comment
2017-12-07 23:06:08 +01:00
Patrick Pelissier
11962bf747
Minor comment update.
2017-11-11 20:30:23 +01:00
Patrick Pelissier
e9f5e9b94d
Update comments
2017-11-01 09:37:14 +01:00
Patrick Pelissier
eb75157fd8
Fix comment
2017-10-25 22:13:06 +02:00
Patrick Pelissier
c9e321228f
Fix indentation.
2017-10-04 22:11:47 +02:00
Patrick Pelissier
670502fc2d
Fix issue with GCC < 4.9
2017-08-11 19:51:52 +02:00
Patrick Pelissier
a8f124ed9b
Fix issue with C++ & G++ 4.9
2017-08-08 20:11:13 +02:00
Patrick Pelissier
b63313dfcc
Added a new wrapper.
2017-08-08 20:02:39 +02:00
Patrick Pelissier
57ac0d8ae4
Add implementation of atomic based on mutex.
2017-07-10 20:50:52 +02:00
Patrick Pelissier
72c5c3f371
Replace stdatomic.h (C11 standard compliant header) by a custom one
...
to increase C++ compatibility as stdatomic.h doesn't work in C++!
(I would like to thanks the one(s) who thought it was a good idea
***not*** to include stdatomic.h -and thread.h- in the C++ standard!)
2017-04-13 21:50:16 +02:00