Manage RIDs via id_alloc
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m2s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m2s
This commit is contained in:
@@ -113,11 +113,9 @@ DEFINE_SYSCALL (sys_sched) {
|
||||
return SYSRESULT (ST_OK);
|
||||
}
|
||||
|
||||
/* int mutex_create (int mutex_rid) */
|
||||
/* int mutex_create (void) */
|
||||
DEFINE_SYSCALL (sys_mutex_create) {
|
||||
int mutex_rid = (int)a1;
|
||||
|
||||
struct proc_resource* mutex_resource = proc_create_resource_mutex (proc->procgroup, mutex_rid);
|
||||
struct proc_resource* mutex_resource = proc_create_resource_mutex (proc->procgroup);
|
||||
|
||||
if (mutex_resource == NULL)
|
||||
return SYSRESULT (-ST_OOM_ERROR);
|
||||
@@ -134,7 +132,7 @@ DEFINE_SYSCALL (sys_mutex_delete) {
|
||||
if (mutex_resource == NULL)
|
||||
return SYSRESULT (-ST_NOT_FOUND);
|
||||
|
||||
proc_delete_resource (mutex_resource, rctx);
|
||||
proc_delete_resource (proc->procgroup, mutex_resource, rctx);
|
||||
|
||||
return SYSRESULT (ST_OK);
|
||||
}
|
||||
@@ -183,7 +181,7 @@ DEFINE_SYSCALL (sys_mail_send) {
|
||||
if (procgroup == NULL)
|
||||
return SYSRESULT (-ST_NOT_FOUND);
|
||||
|
||||
struct proc_resource* mail_resource = proc_find_resource (procgroup, 1);
|
||||
struct proc_resource* mail_resource = proc_find_resource (procgroup, 0);
|
||||
|
||||
if (mail_resource == NULL)
|
||||
return SYSRESULT (-ST_NOT_FOUND);
|
||||
@@ -203,7 +201,7 @@ DEFINE_SYSCALL (sys_mail_receive) {
|
||||
if (mesg == NULL)
|
||||
return SYSRESULT (-ST_BAD_ADDRESS_SPACE);
|
||||
|
||||
struct proc_resource* mail_resource = proc_find_resource (proc->procgroup, 1);
|
||||
struct proc_resource* mail_resource = proc_find_resource (proc->procgroup, 0);
|
||||
|
||||
if (mail_resource == NULL)
|
||||
return SYSRESULT (-ST_NOT_FOUND);
|
||||
|
||||
Reference in New Issue
Block a user