lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #19345] tcpip_apimsg+api_msg_post problem


From: Frédéric Bernon
Subject: [lwip-devel] [bug #19345] tcpip_apimsg+api_msg_post problem
Date: Tue, 20 Mar 2007 09:55:35 +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 #4, bug #19345 (project lwip):

Other solution (if someone read it?):

remove MEMP_TCPIP_MSG's alloc/free feature. Because only "api" used it we
could change like this :

err_t
tcpip_apimsg(struct api_msg *apimsg)
{
  struct tcpip_msg msg;
  msg->type = TCPIP_MSG_API;
  msg->msg.apimsg = apimsg;
  sys_mbox_post(mbox, msg);
  sys_mbox_fetch(apimsg->msg.conn->mbox, NULL);
  return ERR_OK;
}

and change at the en of tcpip_thread this line:

memp_free(MEMP_TCPIP_MSG, msg);

by this one :

if (msg->type!=TCPIP_MSG_API) 
  memp_free(MEMP_TCPIP_MSG, msg);

It will be faster, footprint will not be increased and more reliable (no "not
enought memory" problem...). Even, I suggest to directy call tcpip_apimsg from
api_lib.c, because it would be faster and design would be simple (or we can
use a define?)...

Hoping comments ?



    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?19345>

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





reply via email to

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