0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-27 07:54:05 +01:00

ircd::ctx: Add share counter observer to shared_mutex.

This commit is contained in:
Jason Volk 2018-03-26 18:47:29 -07:00
parent e179915008
commit 5b91cbdca1

View file

@ -25,6 +25,7 @@ class ircd::ctx::shared_mutex
void release();
public:
size_t shares() const;
size_t waiting() const;
bool try_lock();
@ -360,6 +361,13 @@ const
return q.size();
}
inline size_t
ircd::ctx::shared_mutex::shares()
const
{
return std::max(s, ssize_t(0));
}
inline void
ircd::ctx::shared_mutex::release()
{