From ba940baa0aff05ad26d265f32f1d185a1f410373 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Fri, 29 Sep 2023 15:17:10 +1000 Subject: Add a lock around the SPI bus This seems to have been the cause of recurring deadlocks that have been difficult to repo. --- src/audio/fatfs_audio_input.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/audio/fatfs_audio_input.cpp') diff --git a/src/audio/fatfs_audio_input.cpp b/src/audio/fatfs_audio_input.cpp index 6039ff9d..54630a98 100644 --- a/src/audio/fatfs_audio_input.cpp +++ b/src/audio/fatfs_audio_input.cpp @@ -91,12 +91,7 @@ auto FatfsAudioInput::NextStream() -> std::shared_ptr { { std::lock_guard guard{new_stream_mutex_}; // If the path is a future, then wait for it to complete. - // TODO(jacqueline): We should really make some kind of - // FreeRTOS-integrated way to block a task whilst awaiting a future. if (pending_path_) { - while (!pending_path_->Finished()) { - vTaskDelay(pdMS_TO_TICKS(100)); - } auto res = pending_path_->Result(); pending_path_.reset(); -- cgit v1.2.3