On Fri, Mar 24, 2017 at 11:10 AM, Przemek Klosowski <
[email protected]> wrote:

>
> On a bare-metal microcontroller, sleep() is a busy loop but in Linux
> sleep/usleep/nanosleep() results in a system call, which explains the
> latency differences. BTW, a busy loop on Linux could still be
> interrupted and result in latency.
>

The only problem I have with that train of thought, is that I've written
code, that literally handled all 200Ksps of the ADC, which used usleep() .
Prior to that, I implemented nearly exactly the same thing I was trying to
explain here, but both sides of my project were in userspace. One to read
from the CANBUS, and Decode PGN's in real-time, the other halt taking that
data, and putting it out to a web page via web sockets. When I tested this
with redundant data, I was getting 2000+ web socket msg's a second to the
web client. Where using various other methods like select(), and poll() was
achieving less than 20 msg's a second.

So, I'm not arguing, but rather confused as to why this would work for me,
and not for someone else.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALHSORoPTUyL5H-xy8MNYPct7R4yyuvw513h94C-j_OSM0V-%2Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to