netconn API: Remove api_msg wrapper struct, it is not needed any more

This commit is contained in:
Dirk Ziegelmeier
2016-03-16 21:31:19 +01:00
parent 2575c7fb5f
commit d38cdccbcd
5 changed files with 63 additions and 71 deletions

View File

@@ -160,7 +160,6 @@ struct tcp_pcb;
struct udp_pcb;
struct raw_pcb;
struct netconn;
struct api_msg_msg;
/** A callback prototype to inform about events for a netconn */
typedef void (* netconn_callback)(struct netconn *, enum netconn_evt, u16_t len);
@@ -228,7 +227,7 @@ struct netconn {
/** TCP: when data passed to netconn_write doesn't fit into the send buffer,
this temporarily stores the message.
Also used during connect and close. */
struct api_msg_msg *current_msg;
struct api_msg *current_msg;
#endif /* LWIP_TCP */
/** A callback function that is informed about events for this netconn */
netconn_callback callback;

View File

@@ -75,7 +75,7 @@ extern "C" {
/** This struct includes everything that is necessary to execute a function
for a netconn in another thread context (mainly used to process netconns
in the tcpip_thread context to be thread safe). */
struct api_msg_msg {
struct api_msg {
/** The netconn which to process - always needed: it includes the semaphore
which is used to block the application thread until the function finished. */
struct netconn *conn;
@@ -150,14 +150,6 @@ struct api_msg_msg {
#endif /* LWIP_NETCONN_SEM_PER_THREAD */
/** This struct contains a function to execute in another thread context and
a struct api_msg_msg that serves as an argument for this function.
This is passed to tcpip_apimsg to execute functions in tcpip_thread context. */
struct api_msg {
/** arguments for this function */
struct api_msg_msg msg;
};
#if LWIP_DNS
/** As lwip_netconn_do_gethostbyname requires more arguments but doesn't require a netconn,
it has its own struct (to avoid struct api_msg getting bigger than necessary).