lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Re: [lwip] threads, semaphores and raw interface question


From: Adam Dunkels
Subject: [lwip-users] Re: [lwip] threads, semaphores and raw interface question
Date: Wed, 08 Jan 2003 22:22:15 -0000

Hi Leon!

On Tuesday 11 December 2001 10.38, you wrote:
> [Re-post, I scr*wed up my earlier email due to me strungling using L*tus
> N*tes]

:-P

> Hello Adam,
>
> OK, that clears things up for me.
>
> An additional question, just to be sure I understand the consequences
> of using the raw API:
>
> Does this mean the messaging (mail box) calls can be left empty as well?
>
> So, under pre-0.5 lwIP, the minimal single-threaded sys_arch merely has to
> implement the timeout call?

Both your conclusions are correct. In fact, for 0.5 (the current CVS version) 
not even the timeout stuff (i.e., sys_arch_sem_wait()) has to be implemented; 
by picking out only the most relevant stuff from the stack, it is even 
possible to go without that.

The minimal OS/lwIP interface is this: 

* Call tcp_fasttmr() every 200 ms or so (TCP_FAST_INTERVAL ms).
* Call tcp_slowtmr() every 500 ms or so (TCP_SLOW_INTERVAL ms).
* Call ip_input() when a packet arrives.

This can be found in the file src/api/tcpip.c in the current version.

If multithreading and timeouts are not needed, all sys_arch stuff can then be 
implemented as empty functions or even as null #defines (to save code and 
stack space).

/adam
-- 
Adam Dunkels <address@hidden>
http://www.sics.se/~adam
[This message was sent through the lwip discussion list.]




reply via email to

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