do {\
uint8_t os_received;\
MsgQ_t queue = os_msgQ_find(task_id);\
os_task_set_wait_queue(running_tid, queue);\
Evt_t event = os_msgQ_event_get(queue);\
os_task_set_change_event(running_tid, event);\
do {\
os_received = os_msg_receive((
Msg_t*)pMsg, os_msgQ_find(task_id));\
if ( os_received == MSG_QUEUE_EMPTY ){\
if ( async == 0 ) {\
os_task_set_msg_result(running_tid, os_received);
\
os_received = os_task_get_msg_result(running_tid);\
event = os_task_get_change_event(running_tid);\
}\
else {\
((
Msg_t*)pMsg)->signal = NO_MSG_ID;\
os_received = MSG_QUEUE_UNDEF;\
}\
}\
} while ( os_received == MSG_QUEUE_EMPTY );\
if ( MSG_QUEUE_RECEIVED == os_received) {\
os_signal_event(event);\
os_event_set_signaling_tid(event, running_tid );\
}\
} while(0)
#define event_wait(event)
Definition: os_applAPI.h:263
Definition: os_msgqueue.h:50