diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-04-04 23:27:27 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-04-05 05:47:04 +0200 |
commit | 191ffe272b8fb81924814b95504313a5d9f63526 (patch) | |
tree | 620101c407cab4307e0b2d06022317a513d28e63 | |
parent | 3ee2fdb7c07259f20e067bf1527da880474a2e6b (diff) | |
download | rockbox-191ffe272b8fb81924814b95504313a5d9f63526.tar.gz rockbox-191ffe272b8fb81924814b95504313a5d9f63526.zip |
Threading: Use 'size_t' for stack size in core threading code
For some reason it was defined as 'unsigned short' but all arguments to
the threading functions and other structs used size_t. The SDL plugin
tried to allocate a 2MB stack and this resulted in much badness.
This is a _very_ old bug, and might be responsible for countless subtle
bugs!
Change-Id: I8b7fd79a10c21e3ab524a89b4d40d9afa4fab638
-rw-r--r-- | firmware/kernel/thread-internal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/kernel/thread-internal.h b/firmware/kernel/thread-internal.h index fe053fa070..e47a37dfd7 100644 --- a/firmware/kernel/thread-internal.h +++ b/firmware/kernel/thread-internal.h | |||
@@ -128,7 +128,7 @@ struct thread_entry | |||
128 | all threads blocked by this one) */ | 128 | all threads blocked by this one) */ |
129 | #endif | 129 | #endif |
130 | #ifndef HAVE_SDL_THREADS | 130 | #ifndef HAVE_SDL_THREADS |
131 | unsigned short stack_size; /* Size of stack in bytes */ | 131 | size_t stack_size; /* Size of stack in bytes */ |
132 | #endif | 132 | #endif |
133 | unsigned char state; /* Thread slot state (STATE_*) */ | 133 | unsigned char state; /* Thread slot state (STATE_*) */ |
134 | #ifdef HAVE_SCHEDULER_BOOSTCTRL | 134 | #ifdef HAVE_SCHEDULER_BOOSTCTRL |