Skip to content
Snippets Groups Projects
Commit 8c722cab authored by Jeremie Deray's avatar Jeremie Deray
Browse files

state_block::_is_fixed made atomic

parent adb10a48
No related branches found
No related tags found
1 merge request!205Mutex state block
Pipeline #
...@@ -49,7 +49,7 @@ public: ...@@ -49,7 +49,7 @@ public:
NodeBaseWPtr node_ptr_; //< pointer to the wolf Node owning this StateBlock NodeBaseWPtr node_ptr_; //< pointer to the wolf Node owning this StateBlock
bool fixed_; ///< Key to indicate whether the state is fixed or not std::atomic_bool fixed_; ///< Key to indicate whether the state is fixed or not
std::atomic<int> state_size_; ///< State vector size std::atomic<int> state_size_; ///< State vector size
Eigen::VectorXs state_; ///< State vector storing the state values Eigen::VectorXs state_; ///< State vector storing the state values
...@@ -198,7 +198,7 @@ inline Size StateBlock::getLocalSize() const ...@@ -198,7 +198,7 @@ inline Size StateBlock::getLocalSize() const
inline bool StateBlock::isFixed() const inline bool StateBlock::isFixed() const
{ {
return fixed_; return fixed_.load();
} }
inline void StateBlock::fix() inline void StateBlock::fix()
...@@ -213,7 +213,7 @@ inline void StateBlock::unfix() ...@@ -213,7 +213,7 @@ inline void StateBlock::unfix()
inline void StateBlock::setFixed(bool _fixed) inline void StateBlock::setFixed(bool _fixed)
{ {
fixed_ = _fixed; fixed_.store(_fixed);
addNotification(Notification::FIX_UPDATE); addNotification(Notification::FIX_UPDATE);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment