From 234c7d58bf300b830cb3772e29877e80419cafe9 Mon Sep 17 00:00:00 2001 From: yangguangcai Date: Thu, 1 Aug 2024 20:05:20 +0800 Subject: [PATCH] rtc alarm:fix doesn't call nxsig_notification Signed-off-by: yangguangcai --- drivers/timers/rtc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/timers/rtc.c b/drivers/timers/rtc.c index 5fe50dec39..21db78a246 100644 --- a/drivers/timers/rtc.c +++ b/drivers/timers/rtc.c @@ -185,15 +185,15 @@ static void rtc_alarm_callback(FAR void *priv, int alarmid) if (alarminfo->active) { + /* The alarm is no longer active */ + + alarminfo->active = false; + /* Yes.. signal the alarm expiration */ nxsig_notification(alarminfo->pid, &alarminfo->event, SI_QUEUE, &alarminfo->work); } - - /* The alarm is no longer active */ - - alarminfo->active = false; } #endif