Cleanup syscalls
All checks were successful
Build documentation / build-and-deploy (push) Successful in 34s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 34s
This commit is contained in:
@@ -42,7 +42,6 @@ struct proc_resource* proc_create_resource_mutex (struct procgroup* procgroup, i
|
||||
resource->u.mutex.resource = resource;
|
||||
resource->rid = rid;
|
||||
resource->type = PR_MUTEX;
|
||||
resource->refs = 1;
|
||||
|
||||
spin_lock (&procgroup->lock, &ctxpg);
|
||||
rbtree_insert (struct proc_resource, &procgroup->resource_tree, &resource->resource_tree_link,
|
||||
@@ -52,9 +51,7 @@ struct proc_resource* proc_create_resource_mutex (struct procgroup* procgroup, i
|
||||
return resource;
|
||||
}
|
||||
|
||||
void proc_resource_unlink (struct proc_resource* resource) {
|
||||
if (atomic_fetch_sub (&resource->refs, 1) == 1) {
|
||||
resource->ops.cleanup (resource);
|
||||
free (resource);
|
||||
}
|
||||
void proc_delete_resource (struct proc_resource* resource) {
|
||||
resource->ops.cleanup (resource);
|
||||
free (resource);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user