mirror of https://github.com/snes9xgit/snes9x.git
Allow thread reinitialization.
This commit is contained in:
parent
2426c2412f
commit
8b99749aba
|
@ -309,6 +309,7 @@ static void S9xAPUThreadInit(void)
|
|||
thread_running_semaphore = CreateSemaphore(NULL, 0, 1, NULL);
|
||||
thread_waiting_semaphore = CreateSemaphore(NULL, 0, 1, NULL);
|
||||
thread_running = FALSE;
|
||||
thread_exit = FALSE;
|
||||
worker_thread = CreateThread(NULL, 0,S9xAPUWorkerThread, NULL, 0, &worker_thread_id);
|
||||
}
|
||||
|
||||
|
@ -383,6 +384,7 @@ static void S9xAPUThreadInit(void)
|
|||
pthread_cond_init(&thread_running_cond, NULL);
|
||||
pthread_mutex_init(&thread_running_mutex, NULL);
|
||||
thread_running = FALSE;
|
||||
thread_exit = FALSE;
|
||||
pthread_create(&worker_thread, NULL, S9xAPUWorkerThread, NULL);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue