You're also not going to be able to use alarm(), or any functions that gets
time from the system. Not if you want to stay reasonably deterministic.
Write your userspace app to do one thing, and fast, and handle the rest
else where. For instance if you're sending your data to some remote
location. Have that remote location time stamp the data.

On Thu, Mar 23, 2017 at 3:03 AM, William Hermans <yyrk...@gmail.com> wrote:

>
>
> On Wed, Mar 22, 2017 at 10:13 PM, ags <alfred.g.schm...@gmail.com> wrote:
>
>> I thought using select() to wait for notification of an event (by
>> "listening" to the fsys uio files) would free the ARM cpu to do other
>> things while waiting, but provide the most immediate path to the user space
>> application to send more data. Is there a better way?
>>
>
> So that select() is probably your whole problem. Unless, you're using
> other system calls as well. But I've already discussed with you the best,
> and fastest way to achieve your goal. Several times in fact. Use a bit in
> memory, *somewhere*.
>
> PRU side:
> while(somewhere & 0x1 )
>     usleep(1000);
> /* Do our work after while() fall through */
>
> Userspace side:
> while(! (somewhere & 0x1) )
>     usleep(1000);
> /* Do our work after while() fall through */
>
> No need for select(), no need for fancy threading calls, or other magical
> hand waving. Just two simple busy wait loops waiting for their respective
> turns. But, don't forget to toggle the bit back, when you're done. Anyway,
> it's not really Linux that's off in the weeds. Well perhaps it is, but your
> application is pushing it into the weeds.
>

-- 
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 beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALHSORrcujEkGLPcUDWMmaycsahJ9mXZ4w3Bo2izL77hipRZ1Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to