mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-01 06:07:59 +00:00
Kernel: Use non-locking {Nonnull,}RefPtr for OpenFileDescription
This patch switches away from {Nonnull,}LockRefPtr to the non-locking
smart pointers throughout the kernel.
I've looked at the handful of places where these were being persisted
and I don't see any race situations.
Note that the process file descriptor table (Process::m_fds) was already
guarded via MutexProtected.
This commit is contained in:
@@ -15,7 +15,7 @@ namespace Kernel {
|
||||
File::File() = default;
|
||||
File::~File() = default;
|
||||
|
||||
ErrorOr<NonnullLockRefPtr<OpenFileDescription>> File::open(int options)
|
||||
ErrorOr<NonnullRefPtr<OpenFileDescription>> File::open(int options)
|
||||
{
|
||||
auto description = OpenFileDescription::try_create(*this);
|
||||
if (!description.is_error()) {
|
||||
|
||||
Reference in New Issue
Block a user