kernel: msgq: error handling
Add runtime error handling for k_msgq_cleanup. We return 0 on success now and -EAGAIN when cleanup is not possible. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
dfc2bbcd3c
commit
11b9365542
2 changed files with 9 additions and 3 deletions
|
@ -3698,8 +3698,10 @@ __syscall int k_msgq_alloc_init(struct k_msgq *msgq, size_t msg_size,
|
|||
*
|
||||
* @param msgq message queue to cleanup
|
||||
*
|
||||
* @retval 0 on success
|
||||
* @retval -EBUSY Queue not empty
|
||||
*/
|
||||
void k_msgq_cleanup(struct k_msgq *msgq);
|
||||
int k_msgq_cleanup(struct k_msgq *msgq);
|
||||
|
||||
/**
|
||||
* @brief Send a message to a message queue.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue