Fix scheduler locking hierarchy

This commit is contained in:
2026-01-22 15:59:29 +01:00
parent fea0999726
commit c26fd3cb2b
6 changed files with 81 additions and 68 deletions

View File

@@ -234,6 +234,7 @@ DEFINE_SYSCALL (sys_lock_mutex) {
if (mutex_resource == NULL)
return -ST_NOT_FOUND;
DEBUG ("locking %d\n", proc->pid);
proc_mutex_lock (proc, &mutex_resource->u.mutex);
return ST_OK;
@@ -252,6 +253,7 @@ DEFINE_SYSCALL (sys_unlock_mutex) {
if (mutex_resource == NULL)
return -ST_NOT_FOUND;
DEBUG ("unlocking %d\n", proc->pid);
return proc_mutex_unlock (proc, &mutex_resource->u.mutex) ? ST_OK : -ST_PERMISSION_ERROR;
}