lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Re: [lwip] sys_timeout()


From: Adam Dunkels
Subject: [lwip-users] Re: [lwip] sys_timeout()
Date: Wed, 08 Jan 2003 22:08:43 -0000

On Thursday 18 October 2001 11:44, you wrote:
> thanks for answering my naiv questions.

They are not naive :-)

> >There are no reqiurements of this kind - this is up to the underlying
>
> process
>
> >scheduler in the kernel. The time-out scheduling should not be confused
> > with thread scheduling, which is handled by the kernel on which lwIP is
> > run.
>
> Well I think I might have to confuse (or combine) both. My problem is that
> I can not let lwIP handle the semaphores/messages, it must be done by the
> OS (SMSQ/E).

That is the way it is indented to be - the sys_arch code serves as a wrapper 
to the underlying semaphores/message primitives of the OS. This is how both 
the Unix port (which uses the underlying pthread primitives) and the RTXC 
port (which uses the RTXC semaphores and queues) work.

> The reason is, that the application code is not statically linked to the
> TCP/IP code. And dynamical linking is not possible. TCP/IP job and the
> application can not share the same entrys to the lwIP sema/message calls
> :-(
>
> Hence the TCP/IP job can only communicate with the application jobs by
> sema/message calls handled solely by the OS, not by lwIP. Now if the lwIP
> timer scheduling directly depends on semaphore/message related scheduling,
> it probably must also be handled by the OS. (And this OS doesn't support
> timeouts the way you have defined them.)

The timer functionality is completely separate from the semaphores, message 
queues, and threads of the underlying OS. The timers are completely contained 
within each thread and the OS will never even know that they exist. The 
timers are *not* handled by the OS, but by the wrapper code in the sys_arch.c.

Another problem with running lwIP in an environment such as the one you 
describe might be that shared memory is used throughout the lwIP code. The 
application programs and the TCP/IP stack uses shared memory to communicate. 
The memory areas that are shared are the ram[] and memp_memory[] arrays in 
the mem.c and memp.c files.

Cheers,

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




reply via email to

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