nitlog: use Mutex

Issue #3804
This commit is contained in:
Alexander Boettcher
2020-07-06 12:50:14 +02:00
committed by Norman Feske
parent 3d634df34d
commit 973fbc98be

View File

@@ -193,7 +193,7 @@ class Log_window
bool _scroll = false; /* scroll mode (when text hits bottom) */
char _attr[LOG_W]; /* character attribute buffer */
bool _dirty = true; /* schedules the log window for a redraw */
Genode::Lock _dirty_lock { };
Genode::Mutex _dirty_mutex { };
public:
@@ -226,7 +226,7 @@ class Log_window
_scroll = true;
/* schedule log window for redraw */
Genode::Lock::Guard lock_guard(_dirty_lock);
Genode::Mutex::Guard guard(_dirty_mutex);
_dirty |= 1;
}
@@ -238,7 +238,7 @@ class Log_window
bool draw()
{
{
Genode::Lock::Guard lock_guard(_dirty_lock);
Genode::Mutex::Guard guard(_dirty_mutex);
if (!_dirty) return false;
_dirty = false;
}