Rework lock_core / timers (#378)

- Add recursive_mutex
  - Make all locking primitives and sleep use common overridable wait/notify support to allow RTOS
    implementations to replace WFE/SEV with something more appropriate
  - Add busy_wait_ms
This commit is contained in:
Graham Sanderson
2021-05-05 11:46:25 -05:00
committed by GitHub
parent ec0dc7a88b
commit 6d87da4c59
15 changed files with 434 additions and 152 deletions

View File

@ -118,7 +118,11 @@ void runtime_init(void) {
// the first function pointer, not the address of it.
for (mutex_t *m = &__mutex_array_start; m < &__mutex_array_end; m++) {
mutex_init(m);
if (m->recursion_state) {
recursive_mutex_init(m);
} else {
mutex_init(m);
}
}
#if !(PICO_NO_RAM_VECTOR_TABLE || PICO_NO_FLASH)