forked from len0rd/rockbox
Watch out for uninitialized threads[] in init_threads() which can cause big headaches later in unrelated places.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14934 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
eb202355a7
commit
ea47ee64f0
1 changed files with 7 additions and 0 deletions
|
|
@ -1038,6 +1038,13 @@ void init_threads(void)
|
|||
|
||||
/* CPU will initialize first and then sleep */
|
||||
slot = find_empty_thread_slot();
|
||||
#if THREAD_EXTRA_CHECKS
|
||||
/* This can fail if, for example, .bss isn't zero'ed out by the loader
|
||||
or threads is in the wrong section. */
|
||||
if (slot < 0) {
|
||||
panicf("uninitialized threads[]");
|
||||
}
|
||||
#endif
|
||||
|
||||
cores[core].sleeping = NULL;
|
||||
cores[core].running = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue