/* Handle immediate consumption of received mailbox message data. 
The data is consumed immediately in either of the following cases: 1) The receiver requested immediate retrieval by supplying a buffer to receive the data. 2) There is no data to be retrieved. (i.e. Data size is 0 bytes.) */
static int mbox_message_data_check(struct k_mbox_msg *rx_msg, void *buffer)
/* Handle immediate consumption of received mailbox message data. 
The data is consumed immediately in either of the following cases: 1) The receiver requested immediate retrieval by supplying a buffer to receive the data. 2) There is no data to be retrieved. (i.e. Data size is 0 bytes.) */
static int mbox_message_data_check(struct k_mbox_msg *rx_msg, void *buffer)
{
	if (buffer != NULL) {
		k_mbox_data_get(rx_msg, buffer);
	} else if (rx_msg->size == 0U) {
		mbox_message_dispose(rx_msg);
	} else {
	}
	return 0;
}