forked from len0rd/rockbox
Since the sdl to target tree move, the main thread cannot be removed anymore,
since it's now the default thread which is implicitely created by starting the sim. This caused a segfault that r26283 tried to fix. Revert r26283 and protect the main thread from being removed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26315 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6d281a3896
commit
bc2f8bbc07
3 changed files with 6 additions and 3 deletions
|
|
@ -256,7 +256,6 @@ static bool clean_shutdown(void (*callback)(void *), void *parameter)
|
||||||
(void)parameter;
|
(void)parameter;
|
||||||
bookmark_autobookmark(false);
|
bookmark_autobookmark(false);
|
||||||
call_storage_idle_notifys(true);
|
call_storage_idle_notifys(true);
|
||||||
exit(0);
|
|
||||||
#else
|
#else
|
||||||
long msg_id = -1;
|
long msg_id = -1;
|
||||||
int i;
|
int i;
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,6 @@ void gui_message_loop(void)
|
||||||
case SDL_QUIT:
|
case SDL_QUIT:
|
||||||
{
|
{
|
||||||
sim_exit_irq_handler();
|
sim_exit_irq_handler();
|
||||||
SDL_Quit();
|
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -566,7 +566,12 @@ void remove_thread(unsigned int thread_id)
|
||||||
|
|
||||||
void thread_exit(void)
|
void thread_exit(void)
|
||||||
{
|
{
|
||||||
remove_thread(THREAD_ID_CURRENT);
|
struct thread_entry *t = thread_id_entry(THREAD_ID_CURRENT);
|
||||||
|
/* the main thread cannot be removed since it's created implicitely
|
||||||
|
* by starting the program;
|
||||||
|
* it has no valid jumpbuf to exit, do nothing for now */
|
||||||
|
if (t != &threads[0])
|
||||||
|
remove_thread(t->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void thread_wait(unsigned int thread_id)
|
void thread_wait(unsigned int thread_id)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue