Fix scheduler locking hierarchy
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user