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 21:49:48 -0000

Hi!

On Monday 22 October 2001 10:15, you wrote:
> You're right. A little documentation someday will do.

Yes, and since the sys_arch scheme will be somehwhat changed to 0.5, I'll 
wait with the documentation until then.

> Thanks to your explanation of the expected behaviour of sys_timeout() I've
> been able to do an initial port to SMSQ/E the last weekend. As this
> multitasking OS is based on a non-semaphore concept, I had to write my own
> OS extension for semaphore support with timeout, in assembler. Ugly work. I
> still seem to have bugs in there.

Ouch, writing in assembler is always error prone. Wasn't it possible to 
implement semaphores using the syncronization primitives provided by the OS? 

> >The plans for the sys_arch layer in 0.5 is that the sys_mbox_fetch() and
> >sys_sem_wait() will take an additional argument that specifies the maximum
> >time to wait for the mailbox or the semaphore. The timer scheduling code
> >would then be moved out of the sys_arch file and into a generic sys.c
> > file.
>
> Very good idea. I don't know any OS which directly supports your kind of
> timeout scheduling, so it must be implemented especially for lwIP anyway. I
> don't see any additional performance cost.

Exactly. Most OSes support some kind of "wait with timeout" which blocks the 
thread but only for a specific time, and that would map nicely onto the 
sys_arch scheme for 0.5. For systems that don't have such timeout 
functionality, some more work has to be done, though.

/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]