mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:38:11 +00:00
Kernel: Make self-contained locking smart pointers their own classes
Until now, our kernel has reimplemented a number of AK classes to provide automatic internal locking: - RefPtr - NonnullRefPtr - WeakPtr - Weakable This patch renames the Kernel classes so that they can coexist with the original AK classes: - RefPtr => LockRefPtr - NonnullRefPtr => NonnullLockRefPtr - WeakPtr => LockWeakPtr - Weakable => LockWeakable The goal here is to eventually get rid of the Lock* classes in favor of using external locking.
This commit is contained in:
parent
e475263113
commit
11eee67b85
360 changed files with 1703 additions and 1672 deletions
|
@ -107,7 +107,7 @@ ErrorOr<NonnullOwnPtr<KString>> VirtualConsole::pseudo_name() const
|
|||
return KString::formatted("tty:{}", m_index);
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT NonnullRefPtr<VirtualConsole> VirtualConsole::create(size_t index)
|
||||
UNMAP_AFTER_INIT NonnullLockRefPtr<VirtualConsole> VirtualConsole::create(size_t index)
|
||||
{
|
||||
auto virtual_console_or_error = DeviceManagement::try_create_device<VirtualConsole>(index);
|
||||
// FIXME: Find a way to propagate errors
|
||||
|
@ -115,7 +115,7 @@ UNMAP_AFTER_INIT NonnullRefPtr<VirtualConsole> VirtualConsole::create(size_t ind
|
|||
return virtual_console_or_error.release_value();
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT NonnullRefPtr<VirtualConsole> VirtualConsole::create_with_preset_log(size_t index, CircularQueue<char, 16384> const& log)
|
||||
UNMAP_AFTER_INIT NonnullLockRefPtr<VirtualConsole> VirtualConsole::create_with_preset_log(size_t index, CircularQueue<char, 16384> const& log)
|
||||
{
|
||||
auto virtual_console = VirtualConsole::create(index);
|
||||
// HACK: We have to go through the TTY layer for correct newline handling.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue