mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +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:
parent
05ba4295e9
commit
54550365eb
Notes:
sideshowbarker
2024-07-19 07:30:46 +09:00
Author: https://github.com/bugaevc
Commit: 54550365eb
Pull-request: https://github.com/SerenityOS/serenity/pull/1837
11 changed files with 26 additions and 26 deletions
|
@ -39,7 +39,7 @@ Lockable<HashMap<int, NonnullOwnPtr<SharedBuffer>>>& shared_buffers()
|
|||
|
||||
void SharedBuffer::sanity_check(const char* what)
|
||||
{
|
||||
LOCKER(shared_buffers().lock());
|
||||
LOCKER(shared_buffers().lock(), Lock::Mode::Shared);
|
||||
|
||||
unsigned found_refs = 0;
|
||||
for (const auto& ref : m_refs)
|
||||
|
@ -56,7 +56,7 @@ void SharedBuffer::sanity_check(const char* what)
|
|||
|
||||
bool SharedBuffer::is_shared_with(pid_t peer_pid)
|
||||
{
|
||||
LOCKER(shared_buffers().lock());
|
||||
LOCKER(shared_buffers().lock(), Lock::Mode::Shared);
|
||||
if (m_global)
|
||||
return true;
|
||||
for (auto& ref : m_refs) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue