[asterisk-bugs] [JIRA] (ASTERISK-27619) Build System: Require compiler to provide built-in support for atomic references.
Asterisk Team (JIRA)
noreply at issues.asterisk.org
Wed Aug 8 10:13:03 CDT 2018
[ https://issues.asterisk.org/jira/browse/ASTERISK-27619?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Asterisk Team updated ASTERISK-27619:
-------------------------------------
Target Release Version/s: 16.0.0
> Build System: Require compiler to provide built-in support for atomic references.
> ---------------------------------------------------------------------------------
>
> Key: ASTERISK-27619
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-27619
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Core/BuildSystem
> Affects Versions: GIT
> Reporter: Corey Farrell
> Target Release: 16.0.0
>
>
> I'm working with the jansson project to get thread safe reference counting \[1\]. I'm getting some push-back on the pieces necessary to emulate atomic operations. I'm proposing that Asterisk 16+ should require the availability of __sync or __atomic built-ins:
> * __sync_fetch_and_add or __atomic_fetch_add (used by AO2)
> * __sync_add_and_fetch or __atomic_add_fetch (to be used by jansson)
> * __sync_lock_test_and_set / __sync_lock_release or the __atomic equivalents (used by spinlock.h)
> All of these __sync functions have been available since gcc-4.1.2 \[2\] (released in 2007). The __atomic variants are newer and I believe they should be preferred if available. This is in preparation for Asterisk 16+ hopefully requiring jansson 2.11+ and removing most (or all) locking from main/json.c.
> \[1\]: https://github.com/akheron/jansson/pull/389
> \[2\]: https://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Atomic-Builtins.html
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list