[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Timeout question
From: |
Ivan Warren |
Subject: |
[lwip-users] Timeout question |
Date: |
Tue, 6 Nov 2018 09:52:24 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
People,
I am implementing a "bare metal" (well not really, but that's not the
point) system which is :
- non-preempting multithreaded (no other thread runs before a yield() or
some waiting function)
- Single processor
- All "threads" run with interrupts disabled
- Interrupts have their own context
And
NO_SYS=1 on the lwip side.
There are multiple threads but only one (the "main" thread invokes LWIP
functions), and any "application" is using the RAW api (and is/are in
the main thread)
My questions are :
- How often should I invoke sys_check_timeouts() (every ms, every 10 ms,
every second) - or (better) is there a way to determine (after any state
change obviously) when the next timeout is due ?
- does sys_now/sys_jiffies have to be exactly milleseconds or would
powers of 2 do ? (I have a microsecond counter and a 12 right shift
would make a nice 1024 microseconds - making sys_now() sys_jiffies
return the number of "1.024" ms... would that work ?)
Thanks,
--Ivan
smime.p7s
Description: Signature cryptographique S/MIME
- [lwip-users] Timeout question,
Ivan Warren <=