Merging Runtime into Processor.
This commit is contained in:
@@ -182,7 +182,7 @@ X_STATUS XThread::Create() {
|
||||
// Allocate processor thread state.
|
||||
// This is thread safe.
|
||||
thread_state_ =
|
||||
new ThreadState(kernel_state()->processor()->runtime(), thread_id_, 0,
|
||||
new ThreadState(kernel_state()->processor(), thread_id_, 0,
|
||||
creation_params_.stack_size, thread_state_address_);
|
||||
|
||||
X_STATUS return_code = PlatformCreate();
|
||||
|
||||
@@ -104,7 +104,6 @@ X_STATUS XUserModule::LoadFromFile(const char* path) {
|
||||
|
||||
X_STATUS XUserModule::LoadFromMemory(const void* addr, const size_t length) {
|
||||
Processor* processor = kernel_state()->processor();
|
||||
Runtime* runtime = processor->runtime();
|
||||
|
||||
// Load the XEX into memory and decrypt.
|
||||
xe_xex2_options_t xex_options = {0};
|
||||
@@ -130,11 +129,11 @@ X_STATUS XUserModule::LoadFromMemory(const void* addr, const size_t length) {
|
||||
|
||||
// Prepare the module for execution.
|
||||
// Runtime takes ownership.
|
||||
auto xex_module = std::make_unique<XexModule>(runtime);
|
||||
auto xex_module = std::make_unique<XexModule>(processor);
|
||||
if (xex_module->Load(name_, path_, xex_)) {
|
||||
return X_STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
if (runtime->AddModule(std::move(xex_module))) {
|
||||
if (processor->AddModule(std::move(xex_module))) {
|
||||
return X_STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user