The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

a/math: Add lock for relation history get_size

authored by

Mateo de Mayo and committed by
Jakob Bornecrantz
ce929e80 f0ce1628

+4 -3
+2 -1
src/xrt/auxiliary/math/m_relation_history.cpp
··· 236 236 } 237 237 238 238 uint32_t 239 - m_relation_history_get_size(const struct m_relation_history *rh) 239 + m_relation_history_get_size(struct m_relation_history *rh) 240 240 { 241 + std::unique_lock<os::Mutex> lock(rh->mutex); 241 242 return (uint32_t)rh->impl.size(); 242 243 } 243 244
+2 -2
src/xrt/auxiliary/math/m_relation_history.h
··· 109 109 * @public @memberof m_relation_history 110 110 */ 111 111 uint32_t 112 - m_relation_history_get_size(const struct m_relation_history *rh); 112 + m_relation_history_get_size(struct m_relation_history *rh); 113 113 114 114 /*! 115 115 * Clears the history from all of the items. ··· 199 199 * @copydoc m_relation_history_get_size 200 200 */ 201 201 size_t 202 - size() const noexcept 202 + size() noexcept 203 203 { 204 204 return m_relation_history_get_size(mPtr); 205 205 }