Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Mesosphere Sprint 21
-
2
Description
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