diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/cortex-m/task.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/core/cortex-m/task.c b/core/cortex-m/task.c index 4dde20aa9a..75fbf99155 100644 --- a/core/cortex-m/task.c +++ b/core/cortex-m/task.c @@ -860,20 +860,7 @@ void mutex_lock(struct mutex *mtx) uint32_t value; uint32_t id = 1 << task_get_current(); - /* - * Task ID is not valid before task_start() (since current_task is - * scratchpad), and no need for mutex locking before task switching has - * begun. - */ - if (!task_start_called()) - return; - - /* - * mutex_lock() must not be used in interrupt context (because we wait - * if there is contention). - */ - ASSERT(!in_interrupt_context()); - + ASSERT(id != TASK_ID_INVALID); atomic_or(&mtx->waiters, id); do { |