explain more about priority donation on unlock

This commit is contained in:
Chris Copeland 2024-02-23 02:31:17 -08:00
parent 074fdc691a
commit 75395d3301
Signed by: chrisnc
GPG Key ID: 14550DA72485DF30
1 changed files with 2 additions and 1 deletions

View File

@ -630,7 +630,8 @@ static void rt_syscall_exec(struct rt_syscall_record *record)
rt_atomic_store(&mutex->holder, 0, RT_ATOMIC_RELEASE);
rt_list_remove(&mutex->list);
/* When unlocking, the only donated priority that can change is the
* unlocking task's. */
* unlocking task's, because the task isn't blocked waiting on any
* other mutex, otherwise it wouldn't be running. */
task_donate(rt_active_task);
wake_mutex_waiter(mutex);
break;