diff --git a/include/ircd/ctx/shared_mutex.h b/include/ircd/ctx/shared_mutex.h index 25d60f8cb..3b72c4b35 100644 --- a/include/ircd/ctx/shared_mutex.h +++ b/include/ircd/ctx/shared_mutex.h @@ -25,6 +25,8 @@ class ircd::ctx::shared_mutex void release(); public: + bool unique() const; + bool upgrade() const; size_t shares() const; size_t waiting() const; @@ -372,6 +374,20 @@ const return std::max(s, ssize_t(0)); } +inline bool +ircd::ctx::shared_mutex::upgrade() +const +{ + return u; +} + +inline bool +ircd::ctx::shared_mutex::unique() +const +{ + return s == std::numeric_limits::min(); +} + inline void ircd::ctx::shared_mutex::release() {