/* Get number of available slots for messages in a Message Queue.  */
uint32_t osMessageQueueGetSpace(osMessageQueueId_t msgq_id)
/* Get number of available slots for messages in a Message Queue.  */
uint32_t osMessageQueueGetSpace(osMessageQueueId_t msgq_id)
{
	struct cv2_msgq *msgq = (struct cv2_msgq *)msgq_id;
	if (msgq == NULL) {
		return 0;
	} else {
		return k_msgq_num_free_get(&msgq->z_msgq);
	}
}