[ 
https://issues.apache.org/jira/browse/MESOS-3326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14718174#comment-14718174
 ] 

Neil Conway commented on MESOS-3326:
------------------------------------

Initial work:

https://reviews.apache.org/r/37876/
https://reviews.apache.org/r/37877/
https://reviews.apache.org/r/37878/

Style-wise, I opted to explicitly call load() and store(), rather than rely on 
the overloads for T() and operator=. I think there's some value in being 
explicit, but let me know if you guys think otherwise.

This updates most of the places where volatile and/or GCC intrinsics were used, 
but not all. Remaining places I noticed:

* libprocess/src/tests/process.cpp
* libprocess/include/process/owned.hpp
* libprocess/include/process/shared.hpp
* libprocess/include/process/logging.hpp

> Make use of C++11 atomics
> -------------------------
>
>                 Key: MESOS-3326
>                 URL: https://issues.apache.org/jira/browse/MESOS-3326
>             Project: Mesos
>          Issue Type: Bug
>            Reporter: Neil Conway
>            Assignee: Neil Conway
>
> Now that we require C++11, we can make use of std::atomic. For example:
> * libprocess/process.cpp uses a bare int + __sync_synchronize() for "running"
> * __sync_synchronize() is used in logging.hpp in libprocess and fork.hpp in 
> stout
> * sched/sched.cpp uses a volatile int for "running" -- this is wrong, 
> "volatile" is not sufficient to ensure safe concurrent access
> * "volatile" is used in a few other places -- most are probably dubious but I 
> haven't looked closely



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to