Skip to content

Commit bfb28a7

Browse files
Marc Emmersmaciejbocianski
authored andcommitted
Only schedule mbed_ticker interrupt if queue->head is changed
Reverts change from commit 1057720
1 parent 6634e46 commit bfb28a7

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
@@ -351,14 +351,12 @@ void ticker_insert_event_us(const ticker_data_t *const ticker, ticker_event_t *o
351351
/* if prev is NULL we're at the head */
352352
if (prev == NULL) {
353353
ticker->queue->head = obj;
354+
schedule_interrupt(ticker);
354355
} else {
355356
prev->next = obj;
356357
}
357358

358-
schedule_interrupt(ticker);
359-
360359
core_util_critical_section_exit();
361-
362360
}
363361

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

0 commit comments

Comments
 (0)