diff options
author | Lioncash <mathew1800@gmail.com> | 2014-08-18 05:03:22 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2014-08-18 05:12:20 +0200 |
commit | 98fa3f7cba22997aef8ec4d121584c2488389c38 (patch) | |
tree | 40585fc835fa8fc27882923a4439d88e7ae171de /src/core/hle/kernel/thread.cpp | |
parent | Merge pull request #52 from lioncash/memory (diff) | |
download | yuzu-98fa3f7cba22997aef8ec4d121584c2488389c38.tar yuzu-98fa3f7cba22997aef8ec4d121584c2488389c38.tar.gz yuzu-98fa3f7cba22997aef8ec4d121584c2488389c38.tar.bz2 yuzu-98fa3f7cba22997aef8ec4d121584c2488389c38.tar.lz yuzu-98fa3f7cba22997aef8ec4d121584c2488389c38.tar.xz yuzu-98fa3f7cba22997aef8ec4d121584c2488389c38.tar.zst yuzu-98fa3f7cba22997aef8ec4d121584c2488389c38.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/thread.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 1d7ded6f6..554ec9756 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp @@ -2,13 +2,12 @@ // Licensed under GPLv2 // Refer to the license.txt file included. -#include <stdio.h> - -#include <list> #include <algorithm> -#include <vector> +#include <cstdio> +#include <list> #include <map> #include <string> +#include <vector> #include "common/common.h" #include "common/thread_queue_list.h" @@ -25,8 +24,8 @@ namespace Kernel { class Thread : public Kernel::Object { public: - const char* GetName() const { return name; } - const char* GetTypeName() const { return "Thread"; } + std::string GetName() const { return name; } + std::string GetTypeName() const { return "Thread"; } static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::Thread; } Kernel::HandleType GetHandleType() const { return Kernel::HandleType::Thread; } @@ -71,7 +70,7 @@ public: std::vector<Handle> waiting_threads; - char name[Kernel::MAX_NAME_LENGTH + 1]; + std::string name; }; // Lists all thread ids that aren't deleted/etc. @@ -336,9 +335,7 @@ Thread* CreateThread(Handle& handle, const char* name, u32 entry_point, s32 prio thread->processor_id = processor_id; thread->wait_type = WAITTYPE_NONE; thread->wait_handle = 0; - - strncpy(thread->name, name, Kernel::MAX_NAME_LENGTH); - thread->name[Kernel::MAX_NAME_LENGTH] = '\0'; + thread->name = name; return thread; } |