1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:38:11 +00:00

Kernel: Store process names as KString

This commit is contained in:
Andreas Kling 2021-09-07 12:53:28 +02:00
parent db2e67fd53
commit 55b0b06897
15 changed files with 46 additions and 32 deletions

View file

@ -19,10 +19,13 @@ UNMAP_AFTER_INIT void WorkQueue::initialize()
g_io_work = new WorkQueue("IO WorkQueue");
}
UNMAP_AFTER_INIT WorkQueue::WorkQueue(const char* name)
UNMAP_AFTER_INIT WorkQueue::WorkQueue(StringView name)
{
RefPtr<Thread> thread;
Process::create_kernel_process(thread, name, [this] {
auto name_kstring = KString::try_create(name);
if (name_kstring.is_error())
TODO();
Process::create_kernel_process(thread, name_kstring.release_value(), [this] {
for (;;) {
WorkItem* item;
bool have_more;