[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 Jan 24 14:26:50 CST 2018


    [ https://issues.asterisk.org/jira/browse/ASTERISK-27619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=241791#comment-241791 ] 

Asterisk Team commented on ASTERISK-27619:
------------------------------------------

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

> 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
>
> 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