mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-06 13:35:03 +00:00
Kernel: Use shared locking mode in some places
The notable piece of code that remains to be converted is Ext2FS.
This commit is contained in:
committed by
Andreas Kling
parent
05ba4295e9
commit
54550365eb
@@ -45,9 +45,9 @@ Lockable<InlineLinkedList<LocalSocket>>& LocalSocket::all_sockets()
|
||||
return *s_list;
|
||||
}
|
||||
|
||||
void LocalSocket::for_each(Function<void(LocalSocket&)> callback)
|
||||
void LocalSocket::for_each(Function<void(const LocalSocket&)> callback)
|
||||
{
|
||||
LOCKER(all_sockets().lock());
|
||||
LOCKER(all_sockets().lock(), Lock::Mode::Shared);
|
||||
for (auto& socket : all_sockets().resource())
|
||||
callback(socket);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user