diff options
Diffstat (limited to 'kernel/mailbox.c')
-rw-r--r-- | kernel/mailbox.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/mailbox.c b/kernel/mailbox.c index 40a70b812..9483b2e2a 100644 --- a/kernel/mailbox.c +++ b/kernel/mailbox.c @@ -211,7 +211,7 @@ static void _mbox_message_dispose(struct k_mbox_msg *rx_msg) * asynchronous send: free asynchronous message descriptor + * dummy thread pair, then give semaphore (if needed) */ - if (sending_thread->base.flags & K_DUMMY) { + if (sending_thread->base.thread_state & K_DUMMY) { struct k_sem *async_sem = tx_msg->_async_sem; _mbox_async_free((struct k_mbox_async *)sending_thread); @@ -286,7 +286,7 @@ static int _mbox_message_put(struct k_mbox *mbox, struct k_mbox_msg *tx_msg, * note: dummy sending thread sits (unqueued) * until the receiver consumes the message */ - if (sending_thread->base.flags & K_DUMMY) { + if (sending_thread->base.thread_state & K_DUMMY) { _reschedule_threads(key); return 0; } @@ -310,7 +310,7 @@ static int _mbox_message_put(struct k_mbox *mbox, struct k_mbox_msg *tx_msg, #if (CONFIG_NUM_MBOX_ASYNC_MSGS > 0) /* asynchronous send: dummy thread waits on tx queue for receiver */ - if (sending_thread->base.flags & K_DUMMY) { + if (sending_thread->base.thread_state & K_DUMMY) { _pend_thread(sending_thread, &mbox->tx_msg_queue, K_FOREVER); irq_unlock(key); return 0; |