lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Example port for a beginner


From: Mumtaz Ahmad
Subject: Re: [lwip-users] Example port for a beginner
Date: Wed, 23 May 2007 15:31:13 +0500

You are right ,i was talking about full api layer .

----- Original Message ----- 
From: "Frédéric BERNON" <address@hidden>
To: "Mailing list for lwIP users" <address@hidden>
Sent: Wednesday, May 23, 2007 1:56 PM
Subject: RE : [lwip-users] Example port for a beginner


>That's not exactly true...
I suppose that Mumtaz talk to a "full" api layer, even without api_msg.c &
tcpip.c, so, I think in this case, it''s right

>If you want to know more about timeouts:
It's a good explain, I think it will be good to copy/paste it in
sys_arch.txt and sys.c...

====================================
Frédéric BERNON
HYMATOM SA
Chef de projet informatique
Microsoft Certified Professional
Tél. : +33 (0)4-67-87-61-10
Fax. : +33 (0)4-67-70-85-44
Email : address@hidden
Web Site : http://www.hymatom.fr
====================================
P Avant d'imprimer, penser à l'environnement



-----Message d'origine-----
De : address@hidden
[mailto:address@hidden De la part
de Goldschmidt Simon
Envoyé : mercredi 23 mai 2007 10:47
À : Mailing list for lwIP users
Objet : RE: [lwip-users] Example port for a beginner


> 4    Yes sys_timeouts  is pretty confusing but if you implement your
own api layer then you can ignore it all together

That's not exactly true: if NO_SYS=0, you
a) have to supply a function in sys_arch.c (if NO_SYS=0) that returns a
pointer to a list of timeouts that is unique for the current thread
B) have to make sure the value returned by sys_arch_mbox_wait() (and
sys_arch_sem_wait()) is correct (the number of miliseconds waited for a
message)!

If you want to know more about timeouts: it is a linked list including
function pointers and values of miliseconds to wait before calling the
function. When waiting for a message in an mbox, the time waited is
substracted from the first timeout, and if that time is 0, the timeout
function is called and the first item is popped off the list. This mechanism
only works if NO_SYS=0 since otherwise, you don't have mboxes. But if you
have mboxes, you kind of get the timeout functionality for free. The
downside of this approach is that the timing is pretty inaccurate. If you
have many messages in the mbox and you will not have to wait on any message,
sys_arch_mbox_wait() will always return 0 since it didn't have to wait for
the message. That way timeouts will not be called. Another bad example are
some ports that always return 1 when waiting for a message and 0 if a
message was available right away. That of course leads to totally inaccurate
timeouts.


Simon


_______________________________________________
lwip-users mailing list
address@hidden http://lists.nongnu.org/mailman/listinfo/lwip-users



----------------------------------------------------------------------------
----


> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users





reply via email to

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