mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
a/math: Add lock for relation history get_size
This commit is contained in:
parent
f0ce16288f
commit
ce929e804c
|
@ -236,8 +236,9 @@ m_relation_history_get_latest(struct m_relation_history *rh,
|
|||
}
|
||||
|
||||
uint32_t
|
||||
m_relation_history_get_size(const struct m_relation_history *rh)
|
||||
m_relation_history_get_size(struct m_relation_history *rh)
|
||||
{
|
||||
std::unique_lock<os::Mutex> lock(rh->mutex);
|
||||
return (uint32_t)rh->impl.size();
|
||||
}
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ m_relation_history_get_latest(struct m_relation_history *rh,
|
|||
* @public @memberof m_relation_history
|
||||
*/
|
||||
uint32_t
|
||||
m_relation_history_get_size(const struct m_relation_history *rh);
|
||||
m_relation_history_get_size(struct m_relation_history *rh);
|
||||
|
||||
/*!
|
||||
* Clears the history from all of the items.
|
||||
|
@ -199,7 +199,7 @@ public:
|
|||
* @copydoc m_relation_history_get_size
|
||||
*/
|
||||
size_t
|
||||
size() const noexcept
|
||||
size() noexcept
|
||||
{
|
||||
return m_relation_history_get_size(mPtr);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue