mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 22:38:51 +00:00
Kernel: Rename ScopedSpinlock => SpinlockLocker
This matches MutexLocker, and doesn't sound like it's a lock itself.
This commit is contained in:
parent
55adace359
commit
c922a7da09
Notes:
sideshowbarker
2024-07-18 05:24:51 +09:00
Author: https://github.com/awesomekling
Commit: c922a7da09
78 changed files with 365 additions and 366 deletions
|
@ -412,7 +412,7 @@ Plan9FS::ReceiveCompletion::~ReceiveCompletion()
|
|||
bool Plan9FS::Blocker::unblock(u16 tag)
|
||||
{
|
||||
{
|
||||
ScopedSpinlock lock(m_lock);
|
||||
SpinlockLocker lock(m_lock);
|
||||
if (m_did_unblock)
|
||||
return false;
|
||||
m_did_unblock = true;
|
||||
|
@ -428,7 +428,7 @@ bool Plan9FS::Blocker::unblock(u16 tag)
|
|||
void Plan9FS::Blocker::not_blocking(bool)
|
||||
{
|
||||
{
|
||||
ScopedSpinlock lock(m_lock);
|
||||
SpinlockLocker lock(m_lock);
|
||||
if (m_did_unblock)
|
||||
return;
|
||||
}
|
||||
|
@ -438,7 +438,7 @@ void Plan9FS::Blocker::not_blocking(bool)
|
|||
|
||||
bool Plan9FS::Blocker::is_completed() const
|
||||
{
|
||||
ScopedSpinlock lock(m_completion->lock);
|
||||
SpinlockLocker lock(m_completion->lock);
|
||||
return m_completion->completed;
|
||||
}
|
||||
|
||||
|
@ -470,7 +470,7 @@ void Plan9FS::Plan9FSBlockCondition::unblock_all()
|
|||
void Plan9FS::Plan9FSBlockCondition::try_unblock(Plan9FS::Blocker& blocker)
|
||||
{
|
||||
if (m_fs.is_complete(*blocker.completion())) {
|
||||
ScopedSpinlock lock(m_lock);
|
||||
SpinlockLocker lock(m_lock);
|
||||
blocker.unblock(blocker.completion()->tag);
|
||||
}
|
||||
}
|
||||
|
@ -576,7 +576,7 @@ KResult Plan9FS::read_and_dispatch_one_message()
|
|||
auto optional_completion = m_completions.get(header.tag);
|
||||
if (optional_completion.has_value()) {
|
||||
auto completion = optional_completion.value();
|
||||
ScopedSpinlock lock(completion->lock);
|
||||
SpinlockLocker lock(completion->lock);
|
||||
completion->result = KSuccess;
|
||||
completion->message = adopt_own_if_nonnull(new (nothrow) Message { buffer.release_nonnull() });
|
||||
completion->completed = true;
|
||||
|
@ -666,7 +666,7 @@ void Plan9FS::thread_main()
|
|||
|
||||
void Plan9FS::ensure_thread()
|
||||
{
|
||||
ScopedSpinlock lock(m_thread_lock);
|
||||
SpinlockLocker lock(m_thread_lock);
|
||||
if (!m_thread_running.exchange(true, AK::MemoryOrder::memory_order_acq_rel)) {
|
||||
Process::create_kernel_process(m_thread, "Plan9FS", [&]() {
|
||||
thread_main();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue