diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/kernel/kernel.h | 5 | ||||
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 9 | ||||
| -rw-r--r-- | src/core/hle/kernel/thread.h | 6 |
3 files changed, 12 insertions, 8 deletions
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h index 24d422682..2608eecc9 100644 --- a/src/core/hle/kernel/kernel.h +++ b/src/core/hle/kernel/kernel.h | |||
| @@ -16,11 +16,10 @@ enum KernelIDType { | |||
| 16 | }; | 16 | }; |
| 17 | 17 | ||
| 18 | enum { | 18 | enum { |
| 19 | KERNELOBJECT_MAX_NAME_LENGTH = 255, | 19 | KERNEL_MAX_NAME_LENGTH = 0x100, |
| 20 | KERNEL_DEFAULT_STACK_SIZE = 0x4000, | ||
| 20 | }; | 21 | }; |
| 21 | 22 | ||
| 22 | #define KERNELOBJECT_MAX_NAME_LENGTH 31 | ||
| 23 | |||
| 24 | class KernelObjectPool; | 23 | class KernelObjectPool; |
| 25 | 24 | ||
| 26 | class KernelObject { | 25 | class KernelObject { |
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 833a1b4ba..76a73747d 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -81,7 +81,7 @@ public: | |||
| 81 | 81 | ||
| 82 | WaitType wait_type; | 82 | WaitType wait_type; |
| 83 | 83 | ||
| 84 | char name[KERNELOBJECT_MAX_NAME_LENGTH+1]; | 84 | char name[KERNEL_MAX_NAME_LENGTH+1]; |
| 85 | }; | 85 | }; |
| 86 | 86 | ||
| 87 | // Lists all thread ids that aren't deleted/etc. | 87 | // Lists all thread ids that aren't deleted/etc. |
| @@ -165,7 +165,8 @@ void __KernelResetThread(Thread *t, s32 lowest_priority) { | |||
| 165 | } | 165 | } |
| 166 | 166 | ||
| 167 | /// Creates a new thread | 167 | /// Creates a new thread |
| 168 | Thread *__KernelCreateThread(Handle &handle, const char *name, u32 entry_point, s32 priority, s32 processor_id, u32 stack_top, int stack_size=0x4000) { | 168 | Thread *__KernelCreateThread(Handle &handle, const char *name, u32 entry_point, s32 priority, |
| 169 | s32 processor_id, u32 stack_top, int stack_size) { | ||
| 169 | static u32 _handle_count = 1; | 170 | static u32 _handle_count = 1; |
| 170 | 171 | ||
| 171 | Thread *t = new Thread; | 172 | Thread *t = new Thread; |
| @@ -183,8 +184,8 @@ Thread *__KernelCreateThread(Handle &handle, const char *name, u32 entry_point, | |||
| 183 | t->processor_id = processor_id; | 184 | t->processor_id = processor_id; |
| 184 | t->wait_type = WAITTYPE_NONE; | 185 | t->wait_type = WAITTYPE_NONE; |
| 185 | 186 | ||
| 186 | strncpy(t->name, name, KERNELOBJECT_MAX_NAME_LENGTH); | 187 | strncpy(t->name, name, KERNEL_MAX_NAME_LENGTH); |
| 187 | t->name[KERNELOBJECT_MAX_NAME_LENGTH] = '\0'; | 188 | t->name[KERNEL_MAX_NAME_LENGTH] = '\0'; |
| 188 | 189 | ||
| 189 | return t; | 190 | return t; |
| 190 | } | 191 | } |
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h index cca4e85fd..add6107d7 100644 --- a/src/core/hle/kernel/thread.h +++ b/src/core/hle/kernel/thread.h | |||
| @@ -9,8 +9,12 @@ | |||
| 9 | 9 | ||
| 10 | class Thread; | 10 | class Thread; |
| 11 | 11 | ||
| 12 | /// Creates a new thread | ||
| 13 | Thread *__KernelCreateThread(Handle &handle, const char *name, u32 entry_point, s32 priority, | ||
| 14 | s32 processor_id, u32 stack_top, int stack_size=KERNEL_DEFAULT_STACK_SIZE); | ||
| 15 | |||
| 12 | /// Sets up the primary application thread | 16 | /// Sets up the primary application thread |
| 13 | Handle __KernelSetupMainThread(s32 priority, int stack_size=0x4000); | 17 | Handle __KernelSetupMainThread(s32 priority, int stack_size=KERNEL_DEFAULT_STACK_SIZE); |
| 14 | 18 | ||
| 15 | void __KernelThreadingInit(); | 19 | void __KernelThreadingInit(); |
| 16 | void __KernelThreadingShutdown(); | 20 | void __KernelThreadingShutdown(); |