lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Re: [lwip] query about sys_arch_timeouts (fwd)


From: Kieran Mansley
Subject: [lwip-users] Re: [lwip] query about sys_arch_timeouts (fwd)
Date: Wed, 08 Jan 2003 22:23:40 -0000

On Fri, 15 Feb 2002, Mumtaz Ahmad wrote:

> Hi
> Sorry i missed the last mail. Your reply does clear some thing but i am
> still not fully clear and i am sorry for that

No problem!

> i would change my question as . For me sys_sem_wait() is just a wrapper over
> "operating system semaphore waiting routine" but in sys.c i see
> sys_sem_wait() calling sys_arch_timeouts( ) and does other kinda procession
> before calling the actual wrapper sys_arch_sem_wait( ). Why is it so?

It calls sys_arch_timeouts() to get the current list of timeouts for the
thread.  It needs to do this as sys_arch_sem_wait() could block - if it
did so for too long the timeout would be delayed.  It therefore calculates
how long it is until the next timeout, and asks sys_arch_sem_wait not to
block longer than that amount of time.

In theory however, you shouldn't need to know too much about sys_sem_wait
- it's just an internal routine that you're unlikely to need to call
directly if you're using one of the provided interfaces.  Also, you
shouldn't need to implement it if you're porting to a different OS, as it
is OS independent:  the sys_arch_sem_wait contains all the OS depenedent
stuff, and you do need to implement that for a port.

Hope that helps, let me know if there's anything else you're unclear
about.

Cheers,

Kieran

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




reply via email to

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