diff --git a/core/include/mbox.h b/core/include/mbox.h index 62a4392711..121b9ae65a 100644 --- a/core/include/mbox.h +++ b/core/include/mbox.h @@ -185,6 +185,17 @@ static inline size_t mbox_avail(mbox_t *mbox) return cib_avail(&mbox->cib); } +/** + * @brief Unset's the mbox, effectively deinitializing and invalidating it. + * + * @param[in] mbox ptr to mailbox to operate on + */ +static inline void mbox_unset(mbox_t *mbox) +{ + mbox->msg_array = NULL; + mbox->cib.mask = 0; +} + #ifdef __cplusplus } #endif