Allocating stacks in the right place.

This commit is contained in:
Ben Vanik
2015-05-17 13:10:02 -07:00
parent 37804d692c
commit b44a7a7730
6 changed files with 39 additions and 14 deletions

View File

@@ -90,7 +90,9 @@ X_STATUS AudioSystem::Setup() {
registers_.next_context = 1;
// Setup worker thread state. This lets us make calls into guest code.
thread_state_ = new ThreadState(emulator_->processor(), 0, 0, 128 * 1024, 0);
thread_state_ =
new ThreadState(emulator_->processor(), 0, ThreadStackType::kKernelStack,
0, 128 * 1024, 0);
thread_state_->set_name("Audio Worker");
thread_block_ = memory()->SystemHeapAlloc(2048);
thread_state_->context()->r[13] = thread_block_;