1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-22 14:05:07 +00:00

Kernel: More PID/TID typing

This commit is contained in:
Ben Wiederhake 2020-08-09 01:08:24 +02:00 committed by Andreas Kling
parent 7bdf54c837
commit bee08a4b9f
21 changed files with 67 additions and 60 deletions

View file

@ -40,7 +40,7 @@ namespace Profiling {
static KBufferImpl* s_profiling_buffer;
static size_t s_slot_count;
static size_t s_next_slot_index;
static u32 s_pid;
static ProcessID s_pid { -1 };
String& executable_path()
{
@ -50,7 +50,7 @@ String& executable_path()
return *path;
}
u32 pid()
ProcessID pid()
{
return s_pid;
}
@ -61,7 +61,7 @@ void start(Process& process)
executable_path() = process.executable()->absolute_path().impl();
else
executable_path() = {};
s_pid = process.pid().value(); // FIXME: PID/TID INCOMPLETE
s_pid = process.pid();
if (!s_profiling_buffer) {
s_profiling_buffer = RefPtr<KBufferImpl>(KBuffer::create_with_size(8 * MB).impl()).leak_ref();
@ -87,6 +87,7 @@ Sample& next_sample_slot()
void stop()
{
// FIXME: This probably shouldn't be empty.
}
void did_exec(const String& new_executable_path)