aboutsummaryrefslogtreecommitdiffstats
path: root/os/various/cpp_wrappers/ch.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'os/various/cpp_wrappers/ch.hpp')
-rw-r--r--os/various/cpp_wrappers/ch.hpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/os/various/cpp_wrappers/ch.hpp b/os/various/cpp_wrappers/ch.hpp
index c60572de9..ac17b2659 100644
--- a/os/various/cpp_wrappers/ch.hpp
+++ b/os/various/cpp_wrappers/ch.hpp
@@ -2019,6 +2019,32 @@ namespace chibios_rt {
* @iclass
*/
msg_t fetchI(msg_t *msgp);
+
+ /**
+ * @brief Returns the number of free message slots into a mailbox.
+ * @note Can be invoked in any system state but if invoked out of a
+ * locked state then the returned value may change after reading.
+ * @note The returned value can be less than zero when there are waiting
+ * threads on the internal semaphore.
+ *
+ * @return The number of empty message slots.
+ *
+ * @iclass
+ */
+ cnt_t getFreeCountI(void);
+
+ /**
+ * @brief Returns the number of used message slots into a mailbox.
+ * @note Can be invoked in any system state but if invoked out of a
+ * locked state then the returned value may change after reading.
+ * @note The returned value can be less than zero when there are waiting
+ * threads on the internal semaphore.
+ *
+ * @return The number of queued messages.
+ *
+ * @iclass
+ */
+ cnt_t getUsedCountI(void);
};
/*------------------------------------------------------------------------*