1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #5444 from OlegHahm/msg_send_receive_fix

core: msg_send_receive if receiver is not ready
This commit is contained in:
Martine Lenders 2016-05-31 20:45:57 +02:00
commit c313c26dbb

View File

@ -216,8 +216,11 @@ int msg_send_receive(msg_t *m, msg_t *reply, kernel_pid_t target_pid)
sched_set_status(me, STATUS_REPLY_BLOCKED);
me->wait_data = (void*) reply;
/* we re-use (abuse) reply for sending, because wait_data might be
* overwritten if the target is not in RECEIVE_BLOCKED */
*reply = *m;
/* msg_send blocks until reply received */
return _msg_send(m, target_pid, true, state);
return _msg_send(reply, target_pid, true, state);
}
int msg_reply(msg_t *m, msg_t *reply)