Add mutex syscalls

This commit is contained in:
2026-01-20 22:18:43 +01:00
parent fff51321bc
commit 7eceecf6e3
9 changed files with 122 additions and 22 deletions

View File

@@ -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)