mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
HRT: Drop volatile specifier from function call for non-atomic mode
This allows the compiler to optimize better without loosing any performance / accuracy.
This commit is contained in:
@@ -98,7 +98,7 @@ __EXPORT extern void abstime_to_ts(struct timespec *ts, hrt_abstime abstime);
|
||||
*
|
||||
* This function is not interrupt save.
|
||||
*/
|
||||
__EXPORT extern hrt_abstime hrt_elapsed_time(const volatile hrt_abstime *then);
|
||||
__EXPORT extern hrt_abstime hrt_elapsed_time(const hrt_abstime *then);
|
||||
|
||||
/**
|
||||
* Compute the delta between a timestamp taken in the past
|
||||
|
||||
@@ -598,7 +598,7 @@ abstime_to_ts(struct timespec *ts, hrt_abstime abstime)
|
||||
* Compare a time value with the current time.
|
||||
*/
|
||||
hrt_abstime
|
||||
hrt_elapsed_time(const volatile hrt_abstime *then)
|
||||
hrt_elapsed_time(const hrt_abstime *then)
|
||||
{
|
||||
hrt_abstime delta = hrt_absolute_time() - *then;
|
||||
|
||||
|
||||
@@ -679,7 +679,7 @@ abstime_to_ts(struct timespec *ts, hrt_abstime abstime)
|
||||
* Compare a time value with the current time.
|
||||
*/
|
||||
hrt_abstime
|
||||
hrt_elapsed_time(const volatile hrt_abstime *then)
|
||||
hrt_elapsed_time(const hrt_abstime *then)
|
||||
{
|
||||
hrt_abstime delta = hrt_absolute_time() - *then;
|
||||
|
||||
|
||||
@@ -719,7 +719,7 @@ abstime_to_ts(struct timespec *ts, hrt_abstime abstime)
|
||||
* Compare a time value with the current time.
|
||||
*/
|
||||
hrt_abstime
|
||||
hrt_elapsed_time(const volatile hrt_abstime *then)
|
||||
hrt_elapsed_time(const hrt_abstime *then)
|
||||
{
|
||||
hrt_abstime delta = hrt_absolute_time() - *then;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user