CPP wrapper. In mailbox class added methods getFreeCountI() and getUsedCountI()
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5594 35acf78f-673a-0410-8e92-d51de3d6d3f4master
parent
4d2101edd8
commit
5597fabe0b
|
@ -812,6 +812,16 @@ namespace chibios_rt {
|
|||
|
||||
return chMBFetchI(&mb, msgp);
|
||||
}
|
||||
|
||||
cnt_t Mailbox::getFreeCountI(void) {
|
||||
|
||||
return chMBGetFreeCountI(&mb);
|
||||
}
|
||||
|
||||
cnt_t Mailbox::getUsedCountI(void) {
|
||||
|
||||
return chMBGetUsedCountI(&mb);
|
||||
}
|
||||
#endif /* CH_USE_MAILBOXES */
|
||||
|
||||
#if CH_USE_MEMPOOLS
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
||||
/*------------------------------------------------------------------------*
|
||||
|
|
Loading…
Reference in New Issue