Add mutex syscalls
This commit is contained in:
@@ -43,11 +43,11 @@ void proc_cleanup_resources (struct proc* proc) {
|
||||
void proc_drop_resource (struct proc* proc, struct proc_resource* resource, bool lock) {
|
||||
spin_lock_ctx_t ctxrs;
|
||||
|
||||
DEBUG ("resource=%p created_by=%d vis=%d type=%d rid=%d refs=%d\n", resource,
|
||||
resource->created_by_pid, resource->visibility, resource->type, resource->rid,
|
||||
atomic_load (&resource->refs));
|
||||
|
||||
if (atomic_fetch_sub (&resource->refs, 1) == 1) {
|
||||
DEBUG ("resource=%p created_by=%d vis=%d type=%d rid=%d refs=%d\n", resource,
|
||||
resource->created_by_pid, resource->visibility, resource->type, resource->rid,
|
||||
atomic_load (&resource->refs));
|
||||
|
||||
switch (resource->visibility) {
|
||||
case RV_PRIVATE: {
|
||||
if (lock)
|
||||
|
||||
Reference in New Issue
Block a user