kernel: fix k_msgq_get/put() from ISR
There was no check to see if the current context was running an ISR when taking a decision whether to do a context switch or not. Change-Id: Ib9c426de8c0893b3d9383290bb59f6e0e41e9f52 Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
This commit is contained in:
parent
6a791a3286
commit
8215ce19ce
2 changed files with 10 additions and 2 deletions
|
@ -1602,6 +1602,8 @@ extern void k_msgq_init(struct k_msgq *q, char *buffer,
|
|||
*
|
||||
* This routine sends a message to message queue @a q.
|
||||
*
|
||||
* @note Can be called by ISRs.
|
||||
*
|
||||
* @param q Address of the message queue.
|
||||
* @param data Pointer to the message.
|
||||
* @param timeout Waiting period to add the message (in milliseconds),
|
||||
|
@ -1619,6 +1621,8 @@ extern int k_msgq_put(struct k_msgq *q, void *data, int32_t timeout);
|
|||
* This routine receives a message from message queue @a q in a "first in,
|
||||
* first out" manner.
|
||||
*
|
||||
* @note Can be called by ISRs.
|
||||
*
|
||||
* @param q Address of the message queue.
|
||||
* @param data Address of area to hold the received message.
|
||||
* @param timeout Waiting period to receive the message (in milliseconds),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue