diff options
| author | 2014-12-29 10:55:30 -0200 | |
|---|---|---|
| committer | 2015-01-09 19:43:52 -0200 | |
| commit | 8ad41775ccae67e54e9f03cbe054d7562b1c66ce (patch) | |
| tree | 79d176bd9805cae0a2cfdd12e4c91c108bec0c8d /src/core/hle/kernel/thread.h | |
| parent | Kernel: Don't re-assign object's handle when duplicating one (diff) | |
| download | yuzu-8ad41775ccae67e54e9f03cbe054d7562b1c66ce.tar.gz yuzu-8ad41775ccae67e54e9f03cbe054d7562b1c66ce.tar.xz yuzu-8ad41775ccae67e54e9f03cbe054d7562b1c66ce.zip | |
Kernel: Start using boost::intrusive_ptr for lifetime management
Diffstat (limited to 'src/core/hle/kernel/thread.h')
| -rw-r--r-- | src/core/hle/kernel/thread.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h index 24450379c..284dec400 100644 --- a/src/core/hle/kernel/thread.h +++ b/src/core/hle/kernel/thread.h | |||
| @@ -54,8 +54,8 @@ namespace Kernel { | |||
| 54 | 54 | ||
| 55 | class Thread : public Kernel::Object { | 55 | class Thread : public Kernel::Object { |
| 56 | public: | 56 | public: |
| 57 | static ResultVal<Thread*> Create(const char* name, u32 entry_point, s32 priority, u32 arg, | 57 | static ResultVal<SharedPtr<Thread>> Create(std::string name, VAddr entry_point, s32 priority, |
| 58 | s32 processor_id, u32 stack_top, int stack_size = Kernel::DEFAULT_STACK_SIZE); | 58 | u32 arg, s32 processor_id, VAddr stack_top, u32 stack_size); |
| 59 | 59 | ||
| 60 | std::string GetName() const override { return name; } | 60 | std::string GetName() const override { return name; } |
| 61 | std::string GetTypeName() const override { return "Thread"; } | 61 | std::string GetTypeName() const override { return "Thread"; } |
| @@ -99,7 +99,7 @@ public: | |||
| 99 | Object* wait_object; | 99 | Object* wait_object; |
| 100 | VAddr wait_address; | 100 | VAddr wait_address; |
| 101 | 101 | ||
| 102 | std::vector<Thread*> waiting_threads; // TODO(yuriks): Owned | 102 | std::vector<SharedPtr<Thread>> waiting_threads; |
| 103 | 103 | ||
| 104 | std::string name; | 104 | std::string name; |
| 105 | 105 | ||
| @@ -111,7 +111,7 @@ private: | |||
| 111 | }; | 111 | }; |
| 112 | 112 | ||
| 113 | /// Sets up the primary application thread | 113 | /// Sets up the primary application thread |
| 114 | Thread* SetupMainThread(s32 priority, int stack_size = Kernel::DEFAULT_STACK_SIZE); | 114 | SharedPtr<Thread> SetupMainThread(s32 priority, u32 stack_size); |
| 115 | 115 | ||
| 116 | /// Reschedules to the next available thread (call after current thread is suspended) | 116 | /// Reschedules to the next available thread (call after current thread is suspended) |
| 117 | void Reschedule(); | 117 | void Reschedule(); |