mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:17:36 +00:00
Coding style fixes in AK.
This commit is contained in:
parent
b413e234e1
commit
b75ee4aacb
12 changed files with 126 additions and 126 deletions
|
@ -84,7 +84,7 @@ void MemoryManager::initialize_paging()
|
|||
#endif
|
||||
for (size_t i = (4 * MB); i < (32 * MB); i += PAGE_SIZE)
|
||||
m_free_physical_pages.append(adopt(*new PhysicalPage(PhysicalAddress(i), false)));
|
||||
m_quickmap_addr = LinearAddress(m_free_physical_pages.takeLast().leakRef()->paddr().get());
|
||||
m_quickmap_addr = LinearAddress(m_free_physical_pages.take_last().leakRef()->paddr().get());
|
||||
#ifdef MM_DEBUG
|
||||
dbgprintf("MM: Quickmap will use P%x\n", m_quickmap_addr.get());
|
||||
dbgprintf("MM: Installing page directory\n");
|
||||
|
@ -357,7 +357,7 @@ RetainPtr<PhysicalPage> MemoryManager::allocate_physical_page()
|
|||
#ifdef MM_DEBUG
|
||||
dbgprintf("MM: allocate_physical_page vending P%x (%u remaining)\n", m_free_physical_pages.last()->paddr().get(), m_free_physical_pages.size());
|
||||
#endif
|
||||
return m_free_physical_pages.takeLast();
|
||||
return m_free_physical_pages.take_last();
|
||||
}
|
||||
|
||||
RetainPtr<PhysicalPage> MemoryManager::allocate_supervisor_physical_page()
|
||||
|
@ -368,7 +368,7 @@ RetainPtr<PhysicalPage> MemoryManager::allocate_supervisor_physical_page()
|
|||
#ifdef MM_DEBUG
|
||||
dbgprintf("MM: allocate_supervisor_physical_page vending P%x (%u remaining)\n", m_free_supervisor_physical_pages.last()->paddr().get(), m_free_supervisor_physical_pages.size());
|
||||
#endif
|
||||
return m_free_supervisor_physical_pages.takeLast();
|
||||
return m_free_supervisor_physical_pages.take_last();
|
||||
}
|
||||
|
||||
void MemoryManager::enter_process_paging_scope(Process& process)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
PTYMultiplexer::PTYMultiplexer()
|
||||
: CharacterDevice(5, 2)
|
||||
{
|
||||
m_freelist.ensureCapacity(4);
|
||||
m_freelist.ensure_capacity(4);
|
||||
for (int i = 4; i > 0; --i)
|
||||
m_freelist.unchecked_append(adopt(*new MasterPTY(i - 1)));
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ RetainPtr<FileDescriptor> PTYMultiplexer::open(int& error, int options)
|
|||
error = -EBUSY;
|
||||
return nullptr;
|
||||
}
|
||||
auto master = m_freelist.takeLast();
|
||||
auto master = m_freelist.take_last();
|
||||
dbgprintf("PTYMultiplexer::open: Vending master %u\n", master->index());
|
||||
return VFS::the().open(move(master), error, options);
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ Vector<Process*> Process::allProcesses()
|
|||
{
|
||||
InterruptDisabler disabler;
|
||||
Vector<Process*> processes;
|
||||
processes.ensureCapacity(g_processes->size_slow());
|
||||
processes.ensure_capacity(g_processes->size_slow());
|
||||
for (auto* process = g_processes->head(); process; process = process->next())
|
||||
processes.append(process);
|
||||
return processes;
|
||||
|
@ -380,7 +380,7 @@ int Process::do_exec(const String& path, Vector<String>&& arguments, Vector<Stri
|
|||
|
||||
Scheduler::prepare_to_modify_tss(*this);
|
||||
|
||||
m_name = parts.takeLast();
|
||||
m_name = parts.take_last();
|
||||
|
||||
dword old_esp0 = m_tss.esp0;
|
||||
|
||||
|
@ -490,7 +490,7 @@ Process* Process::create_user_process(const String& path, uid_t uid, gid_t gid,
|
|||
if (!cwd)
|
||||
cwd = VFS::the().root_inode();
|
||||
|
||||
auto* process = new Process(parts.takeLast(), uid, gid, parent_pid, Ring3, move(cwd), nullptr, tty);
|
||||
auto* process = new Process(parts.take_last(), uid, gid, parent_pid, Ring3, move(cwd), nullptr, tty);
|
||||
|
||||
error = process->exec(path, move(arguments), move(environment));
|
||||
if (error != 0) {
|
||||
|
|
|
@ -29,7 +29,7 @@ word gdt_alloc_entry()
|
|||
{
|
||||
ASSERT(s_gdt_freelist);
|
||||
ASSERT(!s_gdt_freelist->is_empty());
|
||||
return s_gdt_freelist->takeLast();
|
||||
return s_gdt_freelist->take_last();
|
||||
}
|
||||
|
||||
void gdt_free_entry(word entry)
|
||||
|
@ -323,7 +323,7 @@ void gdt_init()
|
|||
s_gdtLength = 5;
|
||||
|
||||
s_gdt_freelist = new Vector<word, KmallocEternalAllocator>();
|
||||
s_gdt_freelist->ensureCapacity(256);
|
||||
s_gdt_freelist->ensure_capacity(256);
|
||||
for (size_t i = s_gdtLength; i < 256; ++i)
|
||||
s_gdt_freelist->append(i * 8);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue