2013-08-15 10:17:15 +02:00
|
|
|
/*
|
2014-01-31 15:06:01 +01:00
|
|
|
* Copyright (C) 2013 Freie Universität Berlin.
|
2013-08-15 10:17:15 +02:00
|
|
|
*
|
2014-07-31 19:45:27 +02:00
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
* directory for more details.
|
2014-01-31 15:06:01 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @{
|
|
|
|
* @file msg_help.c
|
|
|
|
* @brief Providing implementation for prototypes defined in msg_help.h.
|
|
|
|
* @author Oliver Gesch <oliver.gesch@googlemail.com>
|
2013-08-15 10:17:15 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
2013-09-30 13:19:19 +02:00
|
|
|
|
|
|
|
#include "thread.h"
|
|
|
|
|
2013-10-15 13:50:11 +02:00
|
|
|
#include "tcp_timer.h"
|
2013-08-15 10:17:15 +02:00
|
|
|
|
2013-09-30 13:19:19 +02:00
|
|
|
#include "msg_help.h"
|
|
|
|
|
2013-08-15 10:17:15 +02:00
|
|
|
void block_continue_thread(void)
|
|
|
|
{
|
2014-07-31 20:51:50 +02:00
|
|
|
// msg_t recv_m;
|
|
|
|
// recv_m.type = TCP_NOT_DEFINED;
|
|
|
|
// while (recv_m.type != TCP_CONTINUE)
|
|
|
|
// {
|
|
|
|
// net_msg_receive(&recv_m);
|
|
|
|
// }
|
2013-08-15 10:17:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
int net_msg_receive(msg_t *m)
|
|
|
|
{
|
|
|
|
return msg_receive(m);
|
|
|
|
}
|
|
|
|
|
|
|
|
int net_msg_reply(msg_t *m, msg_t *reply, uint16_t message)
|
|
|
|
{
|
|
|
|
reply->type = message;
|
|
|
|
return msg_reply(m, reply);
|
|
|
|
}
|
|
|
|
|
2014-07-06 22:57:56 +02:00
|
|
|
int net_msg_send(msg_t *m, kernel_pid_t pid, bool block, uint16_t message)
|
2013-08-15 10:17:15 +02:00
|
|
|
{
|
|
|
|
m->type = message;
|
|
|
|
return msg_send(m, pid, block);
|
|
|
|
}
|
|
|
|
|
2014-07-06 22:57:56 +02:00
|
|
|
int net_msg_send_recv(msg_t *m, msg_t *reply, kernel_pid_t pid, uint16_t message)
|
2013-08-15 10:17:15 +02:00
|
|
|
{
|
|
|
|
m->type = message;
|
|
|
|
return msg_send_receive(m, reply, pid);;
|
|
|
|
}
|
2014-01-31 15:06:01 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
*/
|