lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [patch #8995] timers: fix wrong timings for !NO_SYS targets


From: Sylvain Rochet
Subject: [lwip-devel] [patch #8995] timers: fix wrong timings for !NO_SYS targets
Date: Tue, 21 Jun 2016 10:02:21 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0

Follow-up Comment #4, patch #8995 (project lwip):

Applied :)

By the way, we do not use the time based sys_arch_sem_wait() return value
anymore, should we remove the burden from ports for doing so ?

We can keep compatibility by telling in the documentation it should return 0
(i.e. anything != SYS_ARCH_TIMEOUT) if a message arrived or SYS_ARCH_TIMEOUT.

Also, having a 0 value meaning "infinite timeout" is quite uncommon and
misleading, the main issue about that is there is no way to have messages
having priority over timeouts, which is what we might want to prevent being
stuck in timeouts (ideally an ~equal priority should be given to messages and
timeouts to prevent any lockup condition). We could as well use MAX_INT (or
MAX_SHORT) value and it might return from time to time (each 49.7 days or
65.5s (is it still possible to use short ?)) with no message, which is
acceptable. The other issue about the 0 special value is what we need to
handle this case in a different code path in sys_timeouts_mbox_fetch() AND in
sys_arch_mbox_fetch(), which is not necessary if a 0 value means "try to fetch
a message from the queue and return immediately if no message is pending".


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?8995>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

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