1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 20:04:59 +00:00

Kernel: Rename ScopedSpinlock => SpinlockLocker

This matches MutexLocker, and doesn't sound like it's a lock itself.
This commit is contained in:
Andreas Kling 2021-08-22 01:49:22 +02:00
parent 55adace359
commit c922a7da09
78 changed files with 365 additions and 366 deletions

View file

@ -224,7 +224,7 @@ void GenericFramebufferConsole::show_cursor()
void GenericFramebufferConsole::clear(size_t x, size_t y, size_t length)
{
ScopedSpinlock lock(m_lock);
SpinlockLocker lock(m_lock);
if (x == 0 && length == max_column()) {
// if we need to clear the entire row, just clean it with quick memset :)
auto* offset_in_framebuffer = (u32*)&framebuffer_data()[x * sizeof(u32) * 8 + y * 8 * sizeof(u32) * width()];
@ -264,19 +264,19 @@ void GenericFramebufferConsole::clear_glyph(size_t x, size_t y)
void GenericFramebufferConsole::enable()
{
ScopedSpinlock lock(m_lock);
SpinlockLocker lock(m_lock);
memset(framebuffer_data(), 0, height() * width() * sizeof(u32));
m_enabled.store(true);
}
void GenericFramebufferConsole::disable()
{
ScopedSpinlock lock(m_lock);
SpinlockLocker lock(m_lock);
m_enabled.store(false);
}
void GenericFramebufferConsole::write(size_t x, size_t y, char ch, Color background, Color foreground, bool critical)
{
ScopedSpinlock lock(m_lock);
SpinlockLocker lock(m_lock);
if (!m_enabled.load())
return;