diff options
author | Andreas Kling <kling@serenityos.org> | 2022-08-24 15:56:26 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-08-24 18:35:41 +0200 |
commit | 2c72d495a300bb24dc8b9cf5dd61f09dac7a7736 (patch) | |
tree | d5c66aaea8e296eea285b17119911ee2b78e11ff /Kernel/Memory/PhysicalRegion.h | |
parent | 5a804b9a1df6138ddc5c34f1f71764ef23618206 (diff) | |
download | serenity-2c72d495a300bb24dc8b9cf5dd61f09dac7a7736.zip |
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.
Diffstat (limited to 'Kernel/Memory/PhysicalRegion.h')
-rw-r--r-- | Kernel/Memory/PhysicalRegion.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Memory/PhysicalRegion.h b/Kernel/Memory/PhysicalRegion.h index 9310ae9d44..19c527f7f1 100644 --- a/Kernel/Memory/PhysicalRegion.h +++ b/Kernel/Memory/PhysicalRegion.h @@ -33,8 +33,8 @@ public: OwnPtr<PhysicalRegion> try_take_pages_from_beginning(unsigned); - LockRefPtr<PhysicalPage> take_free_page(); - NonnullLockRefPtrVector<PhysicalPage> take_contiguous_free_pages(size_t count); + RefPtr<PhysicalPage> take_free_page(); + NonnullRefPtrVector<PhysicalPage> take_contiguous_free_pages(size_t count); void return_page(PhysicalAddress); private: |