Lines Matching refs:tx_msg
33 struct k_mbox_msg tx_msg; /* transmit message descriptor */ member
112 static int mbox_message_match(struct k_mbox_msg *tx_msg, in mbox_message_match() argument
117 if (((tx_msg->tx_target_thread == (k_tid_t)K_ANY) || in mbox_message_match()
118 (tx_msg->tx_target_thread == rx_msg->tx_target_thread)) && in mbox_message_match()
120 (rx_msg->rx_source_thread == tx_msg->rx_source_thread))) { in mbox_message_match()
123 rx_msg->rx_source_thread = tx_msg->rx_source_thread; in mbox_message_match()
124 tx_msg->tx_target_thread = rx_msg->tx_target_thread; in mbox_message_match()
128 rx_msg->info = tx_msg->info; in mbox_message_match()
129 tx_msg->info = temp_info; in mbox_message_match()
132 if (rx_msg->size > tx_msg->size) { in mbox_message_match()
133 rx_msg->size = tx_msg->size; in mbox_message_match()
137 rx_msg->tx_data = tx_msg->tx_data; in mbox_message_match()
140 rx_msg->_syncing_thread = tx_msg->_syncing_thread; in mbox_message_match()
158 struct k_mbox_msg *tx_msg; in mbox_message_dispose() local
168 tx_msg = (struct k_mbox_msg *)sending_thread->base.swap_data; in mbox_message_dispose()
171 tx_msg->size = rx_msg->size; in mbox_message_dispose()
179 struct k_sem *async_sem = tx_msg->_async_sem; in mbox_message_dispose()
210 static int mbox_message_put(struct k_mbox *mbox, struct k_mbox_msg *tx_msg, in mbox_message_put() argument
219 tx_msg->rx_source_thread = arch_current_thread(); in mbox_message_put()
222 sending_thread = tx_msg->_syncing_thread; in mbox_message_put()
223 sending_thread->base.swap_data = tx_msg; in mbox_message_put()
233 if (mbox_message_match(tx_msg, rx_msg) == 0) { in mbox_message_put()
295 int k_mbox_put(struct k_mbox *mbox, struct k_mbox_msg *tx_msg, in k_mbox_put() argument
299 tx_msg->_syncing_thread = arch_current_thread(); in k_mbox_put()
303 int ret = mbox_message_put(mbox, tx_msg, timeout); in k_mbox_put()
311 void k_mbox_async_put(struct k_mbox *mbox, struct k_mbox_msg *tx_msg, in k_mbox_async_put() argument
326 async->tx_msg = *tx_msg; in k_mbox_async_put()
327 async->tx_msg._syncing_thread = (struct k_thread *)&async->thread; in k_mbox_async_put()
328 async->tx_msg._async_sem = sem; in k_mbox_async_put()
330 (void)mbox_message_put(mbox, &async->tx_msg, K_FOREVER); in k_mbox_async_put()
386 struct k_mbox_msg *tx_msg; in k_mbox_get() local
399 tx_msg = (struct k_mbox_msg *)sending_thread->base.swap_data; in k_mbox_get()
401 if (mbox_message_match(tx_msg, rx_msg) == 0) { in k_mbox_get()