summaryrefslogtreecommitdiff
path: root/core/cortex-m/task.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/cortex-m/task.c')
-rw-r--r--core/cortex-m/task.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/core/cortex-m/task.c b/core/cortex-m/task.c
index 61697d2684..75fbf99155 100644
--- a/core/cortex-m/task.c
+++ b/core/cortex-m/task.c
@@ -860,13 +860,7 @@ void mutex_lock(struct mutex *mtx)
uint32_t value;
uint32_t id = 1 << task_get_current();
- /*
- * mutex_lock() must not be used in interrupt context (because we wait
- * if there is contention). Task ID is not valid before task_start()
- * (since current_task is scratchpad).
- */
- ASSERT(!in_interrupt_context() && task_start_called());
-
+ ASSERT(id != TASK_ID_INVALID);
atomic_or(&mtx->waiters, id);
do {