Skip to content

Commit b01b173

Browse files
author
Marc Emmers
committed
Only schedule mbed_ticker interrupt if queue->head is changed
Reverts change from commit 1057720
1 parent 24cebba commit b01b173

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

hal/mbed_ticker_api.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,14 +359,12 @@ void ticker_insert_event_us(const ticker_data_t *const ticker, ticker_event_t *o
359359
/* if prev is NULL we're at the head */
360360
if (prev == NULL) {
361361
ticker->queue->head = obj;
362+
schedule_interrupt(ticker);
362363
} else {
363364
prev->next = obj;
364365
}
365366

366-
schedule_interrupt(ticker);
367-
368367
core_util_critical_section_exit();
369-
370368
}
371369

372370
void ticker_remove_event(const ticker_data_t *const ticker, ticker_event_t *obj)

0 commit comments

Comments
 (0)