lwip-members
[Top][All Lists]
Advanced

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

Re: [lwip-members] Seems Error to me!!


From: Jack Carlson
Subject: Re: [lwip-members] Seems Error to me!!
Date: Tue, 24 Jun 2003 21:04:20 -0700 (PDT)

Hi Kieran ,
      I am Using the latest version i guess it is 1.6.3 the following line in the function sys_mbox_post :-
 ((mbox->last + 1) >= (mbox->first + SYS_MBOX_SIZE)) mean that the message queue is already full and the posting thread has to block to give the TCPIP thread chance to read some messages from the queue. If you do not decrement the count after the maximum messsage posted by the thread each time the posting thread will unnecessarily block which is surely a performance issue. What do u say??
Regards
Jack    

Kieran Mansley <address@hidden> wrote:
On Mon, 23 Jun 2003, Jack Carlson wrote:

> Hi All,
> In the function sys_mbox_post function the member variable last of
> the structure sys_mbox is never decremented any where. So after posting
> 128 messages which is defined by the #define SYS_MBOX_SIZE the
> application blocks so that the tcpip_thread function can read some
> messages. Would’nt it be better to decrement the last data member (or
> even reinitializes it to 1 as we do for first data member) when the
> last is equal to first!!! in function sys_mbox_post??? Regards Amit

Which version of lwip and which architecture (eg. unix port or
something else?) are you referring to?

I've had a look at the latest version of the unix port and can't see the
problem you describe. sys_mbox_post() only blocks when last > first +
SYS_MBOX_SIZE which is correct as far as I can tell. Neither last or
first are reset to 1 - both just carry on counting, but we use the %
operator to take the modulus whenever they are used.

Kieran


Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
reply via email to

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