summaryrefslogtreecommitdiff
path: root/core/cortex-m0
diff options
context:
space:
mode:
Diffstat (limited to 'core/cortex-m0')
-rw-r--r--core/cortex-m0/task.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/cortex-m0/task.c b/core/cortex-m0/task.c
index 7179d05629..1d4ded513e 100644
--- a/core/cortex-m0/task.c
+++ b/core/cortex-m0/task.c
@@ -509,9 +509,8 @@ void mutex_lock(struct mutex *mtx)
if (mtx->lock == 0)
break;
__asm__ __volatile__("cpsie i");
- /* TODO(crbug.com/435612, crbug.com/435611)
- * This discards any pending events! */
- task_wait_event(0); /* Contention on the mutex */
+ /* Contention on the mutex */
+ task_wait_event_mask(TASK_EVENT_MUTEX, 0);
}
mtx->lock = 2;
__asm__ __volatile__("cpsie i");