Fix-Point commented on code in PR #18224: URL: https://github.com/apache/nuttx/pull/18224#discussion_r2736316078
########## include/nuttx/hrtimer.h: ########## @@ -207,9 +207,19 @@ int hrtimer_cancel_sync(FAR hrtimer_t *hrtimer); * OK on success; a negated errno value on failure. ****************************************************************************/ +int hrtimer_start_async(FAR hrtimer_t *hrtimer, hrtimer_entry_t func, Review Comment: This doesn't add an interface; instead, it renames the existing external `hrtimer_start` to `hrtimer_start_async` (or more accurately, `hrtimer_start_absolute`), and then implements the externally provided `hrtimer_start` as an inline function. This allows the compiler to optimize away the extra mode branch. If we put the branch inside `hrtimer_start`, the compiler will never be able to optimize that branch. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
