mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:47:35 +00:00
Kernel: Use RefPtr instead of LockRefPtr for PhysicalPage
I believe this to be safe, as the main thing that LockRefPtr provides over RefPtr is safe copying from a shared LockRefPtr instance. I've inspected the uses of RefPtr<PhysicalPage> and it seems they're all guarded by external locking. Some of it is less obvious, but this is an area where we're making continuous headway.
This commit is contained in:
parent
5a804b9a1d
commit
2c72d495a3
33 changed files with 141 additions and 138 deletions
|
@ -8,7 +8,7 @@
|
|||
|
||||
namespace Kernel::Memory {
|
||||
|
||||
LockRefPtr<ScatterGatherList> ScatterGatherList::try_create(AsyncBlockDeviceRequest& request, Span<NonnullLockRefPtr<PhysicalPage>> allocated_pages, size_t device_block_size)
|
||||
LockRefPtr<ScatterGatherList> ScatterGatherList::try_create(AsyncBlockDeviceRequest& request, Span<NonnullRefPtr<PhysicalPage>> allocated_pages, size_t device_block_size)
|
||||
{
|
||||
auto maybe_vm_object = AnonymousVMObject::try_create_with_physical_pages(allocated_pages);
|
||||
if (maybe_vm_object.is_error()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue