mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:27:35 +00:00
Kernel: Rename SpinLock => Spinlock
This commit is contained in:
parent
7d5d26b048
commit
55adace359
110 changed files with 491 additions and 491 deletions
|
@ -59,7 +59,7 @@ UNMAP_AFTER_INIT void ConsoleManagement::initialize()
|
|||
PANIC("Switch to tty value is invalid: {} ", tty_number);
|
||||
}
|
||||
m_active_console = &m_consoles[tty_number];
|
||||
ScopedSpinLock lock(m_lock);
|
||||
ScopedSpinlock lock(m_lock);
|
||||
m_active_console->set_active(true);
|
||||
if (!m_active_console->is_graphical())
|
||||
m_active_console->clear();
|
||||
|
@ -67,7 +67,7 @@ UNMAP_AFTER_INIT void ConsoleManagement::initialize()
|
|||
|
||||
void ConsoleManagement::switch_to(unsigned index)
|
||||
{
|
||||
ScopedSpinLock lock(m_lock);
|
||||
ScopedSpinlock lock(m_lock);
|
||||
VERIFY(m_active_console);
|
||||
VERIFY(index < m_consoles.size());
|
||||
if (m_active_console->index() == index)
|
||||
|
|
|
@ -35,13 +35,13 @@ public:
|
|||
NonnullRefPtr<VirtualConsole> first_tty() const { return m_consoles[0]; }
|
||||
NonnullRefPtr<VirtualConsole> debug_tty() const { return m_consoles[1]; }
|
||||
|
||||
RecursiveSpinLock& tty_write_lock() { return m_tty_write_lock; }
|
||||
RecursiveSpinlock& tty_write_lock() { return m_tty_write_lock; }
|
||||
|
||||
private:
|
||||
NonnullRefPtrVector<VirtualConsole, s_max_virtual_consoles> m_consoles;
|
||||
VirtualConsole* m_active_console { nullptr };
|
||||
SpinLock<u8> m_lock;
|
||||
RecursiveSpinLock m_tty_write_lock;
|
||||
Spinlock<u8> m_lock;
|
||||
RecursiveSpinlock m_tty_write_lock;
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
static Singleton<SpinLockProtected<SlavePTY::List>> s_all_instances;
|
||||
static Singleton<SpinlockProtected<SlavePTY::List>> s_all_instances;
|
||||
|
||||
SpinLockProtected<SlavePTY::List>& SlavePTY::all_instances()
|
||||
SpinlockProtected<SlavePTY::List>& SlavePTY::all_instances()
|
||||
{
|
||||
return s_all_instances;
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ private:
|
|||
|
||||
public:
|
||||
using List = IntrusiveList<SlavePTY, RawPtr<SlavePTY>, &SlavePTY::m_list_node>;
|
||||
static SpinLockProtected<SlavePTY::List>& all_instances();
|
||||
static SpinlockProtected<SlavePTY::List>& all_instances();
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -259,7 +259,7 @@ void VirtualConsole::on_key_pressed(KeyEvent event)
|
|||
|
||||
KResultOr<size_t> VirtualConsole::on_tty_write(const UserOrKernelBuffer& data, size_t size)
|
||||
{
|
||||
ScopedSpinLock global_lock(ConsoleManagement::the().tty_write_lock());
|
||||
ScopedSpinlock global_lock(ConsoleManagement::the().tty_write_lock());
|
||||
auto result = data.read_buffered<512>(size, [&](u8 const* buffer, size_t buffer_bytes) {
|
||||
for (size_t i = 0; i < buffer_bytes; ++i)
|
||||
m_console_impl.on_input(buffer[i]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue