Implements sys_fs_fcntl 0xC0000008 & 0xC000001A (#11957)

This commit is contained in:
RipleyTom 2022-06-11 14:12:42 +02:00 committed by GitHub
parent a2623b1a9a
commit da6434a65a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 188 additions and 21 deletions

View file

@ -83,7 +83,7 @@ error_code sys_memory_allocate(cpu_thread& cpu, u32 size, u64 flags, vm::ptr<u32
}
}
dct.used -= size;
dct.free(size);
return CELL_ENOMEM;
}
@ -154,7 +154,7 @@ error_code sys_memory_allocate_from_container(cpu_thread& cpu, u32 size, u32 cid
}
}
ct->used -= size;
ct->free(size);
return CELL_ENOMEM;
}
@ -172,7 +172,7 @@ error_code sys_memory_free(cpu_thread& cpu, u32 addr)
}
const auto size = (ensure(vm::dealloc(addr)));
reader_lock{id_manager::g_mutex}, ct->used -= size;
reader_lock{id_manager::g_mutex}, ct->free(size);
return CELL_OK;
}
@ -277,7 +277,7 @@ error_code sys_memory_container_create(cpu_thread& cpu, vm::ptr<u32> cid, u32 si
return CELL_OK;
}
dct.used -= size;
dct.free(size);
return CELL_EAGAIN;
}
@ -311,7 +311,7 @@ error_code sys_memory_container_destroy(cpu_thread& cpu, u32 cid)
}
// Return "physical memory" to the default container
g_fxo->get<lv2_memory_container>().used -= ct->size;
g_fxo->get<lv2_memory_container>().free(ct->size);
return CELL_OK;
}