lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [patch #5687] api_lib.c: allocate all 'struct api_msg' on s


From: Frédéric BERNON
Subject: [lwip-devel] [patch #5687] api_lib.c: allocate all 'struct api_msg' on stack instead of mem-pool
Date: Wed, 28 Feb 2007 15:32:18 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2

Follow-up Comment #3, patch #5687 (project lwip):

Isn't be better to directly use the api_msg, without using the api_msg* ?

There is more changes, but call would be a little bit simplest. Example with
netconn_disconnect:

err_t
netconn_disconnect(struct netconn *conn)
{
  struct api_msg msg;
  
  if (conn == NULL) {
    return ERR_VAL;
  }

  msg.type = API_MSG_DISCONNECT;
  msg.msg.conn = conn;  
  api_msg_post(&msg);
  sys_mbox_fetch(conn->mbox, NULL, 0);
  return conn->err;
}



    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?5687>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]