mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +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:
@@ -26,8 +26,8 @@ public:
|
||||
|
||||
class OpenFileDescription final : public AtomicRefCounted<OpenFileDescription> {
|
||||
public:
|
||||
static ErrorOr<NonnullLockRefPtr<OpenFileDescription>> try_create(Custody&);
|
||||
static ErrorOr<NonnullLockRefPtr<OpenFileDescription>> try_create(File&);
|
||||
static ErrorOr<NonnullRefPtr<OpenFileDescription>> try_create(Custody&);
|
||||
static ErrorOr<NonnullRefPtr<OpenFileDescription>> try_create(File&);
|
||||
~OpenFileDescription();
|
||||
|
||||
Thread::FileBlocker::BlockFlags should_unblock(Thread::FileBlocker::BlockFlags) const;
|
||||
|
||||
Reference in New Issue
Block a user