Implement kernel processes

This commit is contained in:
disjtqz
2023-10-12 15:34:27 -04:00
committed by Radosław Gliński
parent ba7397952d
commit a7b047b2a2
15 changed files with 338 additions and 227 deletions

View File

@@ -21,6 +21,7 @@
#include "xenia/base/string_buffer.h"
#include "xenia/base/threading.h"
#include "xenia/cpu/thread_state.h"
#include "xenia/kernel/kernel_state.h"
// As with normal Microsoft, there are like twelve different ways to access
// the audio APIs. Early games use XMA*() methods almost exclusively to touch
@@ -79,7 +80,7 @@ X_STATUS AudioSystem::Setup(kernel::KernelState* kernel_state) {
new kernel::XHostThread(kernel_state, 128 * 1024, 0, [this]() {
WorkerThreadMain();
return 0;
}));
}, kernel_state->GetSystemProcess()));
// As we run audio callbacks the debugger must be able to suspend us.
worker_thread_->set_can_debugger_suspend(true);
worker_thread_->set_name("Audio Worker");

View File

@@ -19,7 +19,7 @@
#include "xenia/cpu/processor.h"
#include "xenia/cpu/thread_state.h"
#include "xenia/kernel/xthread.h"
#include "xenia/kernel/kernel_state.h"
extern "C" {
#include "third_party/FFmpeg/libavutil/log.h"
} // extern "C"
@@ -145,7 +145,7 @@ X_STATUS XmaDecoder::Setup(kernel::KernelState* kernel_state) {
new kernel::XHostThread(kernel_state, 128 * 1024, 0, [this]() {
WorkerThreadMain();
return 0;
}));
}, kernel_state->GetIdleProcess()));//this one doesnt need any process actually. never calls any guest code
worker_thread_->set_name("XMA Decoder");
worker_thread_->set_can_debugger_suspend(true);
worker_thread_->Create();