mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:27:34 +00:00
Kernel: Store Thread name as a KString
This commit is contained in:
parent
07599b48de
commit
d5d8fba579
8 changed files with 43 additions and 33 deletions
|
@ -185,7 +185,7 @@ public:
|
|||
static NonnullRefPtrVector<Process> all_processes();
|
||||
|
||||
template<typename EntryFunction>
|
||||
RefPtr<Thread> create_kernel_thread(EntryFunction entry, u32 priority, const String& name, u32 affinity = THREAD_AFFINITY_DEFAULT, bool joinable = true)
|
||||
RefPtr<Thread> create_kernel_thread(EntryFunction entry, u32 priority, OwnPtr<KString> name, u32 affinity = THREAD_AFFINITY_DEFAULT, bool joinable = true)
|
||||
{
|
||||
auto* entry_func = new EntryFunction(move(entry));
|
||||
return create_kernel_thread([](void* data) {
|
||||
|
@ -193,9 +193,9 @@ public:
|
|||
(*func)();
|
||||
delete func;
|
||||
},
|
||||
priority, name, affinity, joinable);
|
||||
priority, move(name), affinity, joinable);
|
||||
}
|
||||
RefPtr<Thread> create_kernel_thread(void (*entry)(void*), void* entry_data, u32 priority, const String& name, u32 affinity = THREAD_AFFINITY_DEFAULT, bool joinable = true);
|
||||
RefPtr<Thread> create_kernel_thread(void (*entry)(void*), void* entry_data, u32 priority, OwnPtr<KString> name, u32 affinity = THREAD_AFFINITY_DEFAULT, bool joinable = true);
|
||||
|
||||
bool is_profiling() const { return m_profiling; }
|
||||
void set_profiling(bool profiling) { m_profiling = profiling; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue