mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
mbox: provide function to unset initialized mbox
This commit is contained in:
parent
1c036e0116
commit
12194ad9e6
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user