lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Re: [lwip] Question and thoughts..


From: Kieran Mansley
Subject: [lwip-users] Re: [lwip] Question and thoughts..
Date: Thu, 09 Jan 2003 00:25:24 -0000

On Fri, 29 Nov 2002, David Ryan wrote:
> Also..  I'm creating a multithreaded implementation and attempting to
> use the API.  From the list I notice that not too many people are
> working with this.  Anyway.. too my point.  I noticed (due to a bug in
> my sys_arch_sem_wait code)  that memp, mem, pbuf (ones I've found so
> far) are calling sys_sem_wait.  sys_sem_wait has the side effect of
> checking/running timer code.  I would have thought it would make more
> sense to use the sys_arch_sem_wait directly for these type of semaphore
> locks.  I suggest that sys_sem_wait only be called on non-lock type
> semaphores..  ie..  waiting to receive a message to an mbox, etc.

I'm not sure I understand what you're getting at here.  Can you explain
why these particular examples should not call sys_sem_wait?  I think the
reason why lwIP is designed like this, with respect to timers, is so that
in an environment without threads you can still have timers go off at
approximately the right time.  Personally I am running lwIP in a
multithreaded environment, but I have taken a different approach - I have
made the core of the stack thread safe (in it's standard implementation
there should only ever be one thread executing the stack I think) and
implement timers in a completely different thread.  Part of the research
for my PhD is related to TCP timers, so I will be looking at this in much
more detail over the coming months.

Thanks

Kieran

[This message was sent through the lwip discussion list.]




reply via email to

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