mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 03:57:40 +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
|
@ -206,7 +206,7 @@ extern "C" [[noreturn]] UNMAP_AFTER_INIT void init(BootInfo const& boot_info)
|
|||
// We do so we can see the output on the screen as soon as possible.
|
||||
if (!kernel_command_line().is_early_boot_console_disabled()) {
|
||||
if (!multiboot_framebuffer_addr.is_null() && multiboot_framebuffer_type == MULTIBOOT_FRAMEBUFFER_TYPE_RGB) {
|
||||
g_boot_console = &try_make_ref_counted<Graphics::BootFramebufferConsole>(multiboot_framebuffer_addr, multiboot_framebuffer_width, multiboot_framebuffer_height, multiboot_framebuffer_pitch).value().leak_ref();
|
||||
g_boot_console = &try_make_lock_ref_counted<Graphics::BootFramebufferConsole>(multiboot_framebuffer_addr, multiboot_framebuffer_width, multiboot_framebuffer_height, multiboot_framebuffer_pitch).value().leak_ref();
|
||||
} else {
|
||||
g_boot_console = &Graphics::VGATextModeConsole::initialize().leak_ref();
|
||||
}
|
||||
|
@ -251,7 +251,7 @@ extern "C" [[noreturn]] UNMAP_AFTER_INIT void init(BootInfo const& boot_info)
|
|||
}
|
||||
|
||||
{
|
||||
RefPtr<Thread> init_stage2_thread;
|
||||
LockRefPtr<Thread> init_stage2_thread;
|
||||
(void)Process::create_kernel_process(init_stage2_thread, KString::must_create("init_stage2"sv), init_stage2, nullptr, THREAD_AFFINITY_DEFAULT, Process::RegisterProcess::No);
|
||||
// We need to make sure we drop the reference for init_stage2_thread
|
||||
// before calling into Scheduler::start, otherwise we will have a
|
||||
|
@ -377,7 +377,7 @@ void init_stage2(void*)
|
|||
// NOTE: Everything marked UNMAP_AFTER_INIT becomes inaccessible after this point.
|
||||
MM.unmap_text_after_init();
|
||||
|
||||
RefPtr<Thread> thread;
|
||||
LockRefPtr<Thread> thread;
|
||||
auto userspace_init = kernel_command_line().userspace_init();
|
||||
auto init_args = kernel_command_line().userspace_init_args();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue