Commit Graph

4 Commits

Author SHA1 Message Date
Beat Küng 13f2315314 CDev: add DEVICE_POLL_DEBUG macro that removes all poll debug output from the build by default
Reduces 'uorb_tests latency_test' by about 1us
2018-07-30 23:06:32 +02:00
Beat Küng 99fd1f7213 CDev::poll_notify_one: remove checking the semaphore counter
The check is unnecessary. In the worst case the semaphore gets unlocked
twice, but it's not an issue because the waiter is only interested in the
first sem_post(), and the semaphore is then not used anymore.
2018-07-30 23:06:32 +02:00
Beat Küng 72773b75c3 CDev::poll: disable IRQs instead of using an expensive semaphore
poll() is one of the heavily used methods and thus needs to be optimized
as much as possible.

Test on Pixracer: uorb_tests latency_test
Before:
uORB note: ---------------- LATENCY TEST ------------------
INFO  [uorb_tests] mean:     40.4320 us
INFO  [uorb_tests] std dev:   1.3466 us
INFO  [uorb_tests] min:      39 us
INFO  [uorb_tests] max:      57 us
INFO  [uorb_tests] missed topic updates: 0
This Patch:
uORB note: ---------------- LATENCY TEST ------------------
INFO  [uorb_tests] mean:     31.3480 us
INFO  [uorb_tests] std dev:   1.4584 us
INFO  [uorb_tests] min:      30 us
INFO  [uorb_tests] max:      45 us
INFO  [uorb_tests] missed topic updates: 0
2018-07-30 23:06:32 +02:00
Daniel Agar ea3acb7121 cmake remove circular linking and reorganize
- px4_add_module now requires MAIN
 - px4_add_library doesn't automatically link
2018-04-29 21:48:54 -04:00