mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:38:10 +00:00
Kernel: Replace "current" with Thread::current and Process::current
Suggested by Sergey. The currently running Thread and Process are now Thread::current and Process::current respectively. :^)
This commit is contained in:
parent
4f4af24b9d
commit
48f7c28a5c
37 changed files with 257 additions and 252 deletions
|
@ -292,7 +292,7 @@ Optional<KBuffer> procfs$pid_vm(InodeIdentifier identifier)
|
|||
KBufferBuilder builder;
|
||||
JsonArraySerializer array { builder };
|
||||
for (auto& region : process.regions()) {
|
||||
if (!region.is_user_accessible() && !current->process().is_superuser())
|
||||
if (!region.is_user_accessible() && !Process::current->is_superuser())
|
||||
continue;
|
||||
auto region_object = array.add_object();
|
||||
region_object.add("readable", region.is_readable());
|
||||
|
@ -399,7 +399,7 @@ Optional<KBuffer> procfs$profile(InodeIdentifier)
|
|||
InterruptDisabler disabler;
|
||||
KBufferBuilder builder;
|
||||
JsonArraySerializer array(builder);
|
||||
bool mask_kernel_addresses = !current->process().is_superuser();
|
||||
bool mask_kernel_addresses = !Process::current->is_superuser();
|
||||
Profiling::for_each_sample([&](auto& sample) {
|
||||
auto object = array.add_object();
|
||||
object.add("pid", sample.pid);
|
||||
|
@ -640,7 +640,7 @@ Optional<KBuffer> procfs$pid_root(InodeIdentifier identifier)
|
|||
Optional<KBuffer> procfs$self(InodeIdentifier)
|
||||
{
|
||||
char buffer[16];
|
||||
sprintf(buffer, "%u", current->pid());
|
||||
sprintf(buffer, "%u", Process::current->pid());
|
||||
return KBuffer::copy((const u8*)buffer, strlen(buffer));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue