-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix clock realtime monotonic #574
Conversation
…LTIME -> CLOCK_MONOTONIC in SITL" This reverts commit 556c3a3.
…ONOTONIC Signed-off-by: Jukka Laitinen <[email protected]>
Signed-off-by: Jukka Laitinen <[email protected]>
This is a fix for: 73cda71 Author: Jukka Laitinen <[email protected]> Date: Wed Apr 27 10:55:23 2022 +0400 Change orb_publish interface and intialization of advertiser handles Signed-off-by: Jukka Laitinen <[email protected]>
Signed-off-by: Jukka Laitinen <[email protected]>
int take_timedwait(struct timespec *abstime) | ||
{ | ||
#if defined(CONFIG_ARCH_BOARD_PX4_SITL) | ||
return px4_sem_timedwait(&_sem, abstime); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not 100% right, but needed for SITL because of lockstep scheduler. px4_sem_timedwait acts as a wrapper around that as well.
#if defined(CONFIG_ARCH_BOARD_PX4_SITL) | ||
return px4_sem_timedwait(&_sem, abstime); | ||
#else | ||
return sem_clockwait(&_sem, CLOCK_MONOTONIC, abstime); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
px4_sem_clockwait?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, could introduce that. might reduce confusion...
Changing the use of CLOCK_REALTIME -> CLOCK_MONOTONIC in a couple of places
This PR includes one extra patch for fixing buiding one SITL/Test file.