From 81a38b0a78b85326669ce6a087e894a065094eac Mon Sep 17 00:00:00 2001 From: Ville Juven Date: Thu, 28 Nov 2024 12:27:37 +0200 Subject: [PATCH] hrt.c: Remove hrt_elapsed_time_atomic (it is unused) Remove dead code --- platforms/nuttx/src/px4/microchip/mpfs/hrt/hrt.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/platforms/nuttx/src/px4/microchip/mpfs/hrt/hrt.c b/platforms/nuttx/src/px4/microchip/mpfs/hrt/hrt.c index fa99c95bd66e..b2d5b975c109 100644 --- a/platforms/nuttx/src/px4/microchip/mpfs/hrt/hrt.c +++ b/platforms/nuttx/src/px4/microchip/mpfs/hrt/hrt.c @@ -212,21 +212,6 @@ hrt_absolute_time(void) return getreg64(MPFS_CLINT_MTIME); } -/** - * Compare a time value with the current time as atomic operation - */ -hrt_abstime -hrt_elapsed_time_atomic(const volatile hrt_abstime *then) -{ - irqstate_t flags = spin_lock_irqsave_wo_note(&g_hrt_lock); - - hrt_abstime delta = hrt_absolute_time() - *then; - - spin_unlock_irqrestore_wo_note(&g_hrt_lock, flags); - - return delta; -} - /** * Store the absolute time in an interrupt-safe fashion */