Quote:
Originally Posted by kenfox
WPILib uses these routines outside of critical regions, so I assume they are either lock-free or have their own independent locks.
|
My concern was along the following lines. If any of the layers has code like this (pardon the X86speak):
Code:
INCORRECT!!
cli // disable interrupts
/* do something uninterruptable here */
sti // enable interrupts
... instead of this:
Code:
CORRECT:
pushf // save interrupt state
cli // disable interrupts
/* do something uninterruptable here */
popf // restore saved interrupt state
.. then you can't reliably use cli in your application code.
Quote:
|
It looks like the FPGA clock is preferred since the other ways of grabbing a timestamp aren't used by WPILib except in Vision.
|
What the overhead of accessing the FPGA, compared to reading the PPC clock?
Quote:
|
Testing may be the best way to answer these questions ... I'll collect some data on our cRIOs tomorrow.
|
Excellent !