1
0
Fork 0
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:
Catalin Patulea 2007-10-01 04:13:17 +00:00
parent eb202355a7
commit ea47ee64f0

View file

@ -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;