stm32/pendsv: Fix NULL pointer when calling pendsv dispatch function.

This commit is contained in:
Damien George 2019-02-08 16:36:09 +11:00
parent 800871c0cb
commit b546e4b7e9
1 changed files with 2 additions and 1 deletions

View File

@ -79,8 +79,9 @@ void pendsv_schedule_dispatch(size_t slot, pendsv_dispatch_t f) {
void pendsv_dispatch_handler(void) {
for (size_t i = 0; i < PENDSV_DISPATCH_NUM_SLOTS; ++i) {
if (pendsv_dispatch_table[i] != NULL) {
pendsv_dispatch_t f = pendsv_dispatch_table[i];
pendsv_dispatch_table[i] = NULL;
pendsv_dispatch_table[i]();
f();
}
}
}