kernel/process: move current process to kernel instance
Two functional change: QueryProcessMemory uses the process passed from handle instead current_process Thread::Stop() uses TLS from owner_process instead of current_process
This commit is contained in:
parent
d9342622b0
commit
8fb3d8ff38
19 changed files with 96 additions and 55 deletions
|
@ -97,7 +97,7 @@ void Module::Interface::Open(Kernel::HLERequestContext& ctx) {
|
|||
|
||||
if (path_type == CecDataPathType::MboxProgramId) {
|
||||
std::vector<u8> program_id(8);
|
||||
u64_le le_program_id = Kernel::g_current_process->codeset->program_id;
|
||||
u64_le le_program_id = cecd->system.Kernel().GetCurrentProcess()->codeset->program_id;
|
||||
std::memcpy(program_id.data(), &le_program_id, sizeof(u64));
|
||||
session_data->file->Write(0, sizeof(u64), true, program_id.data());
|
||||
session_data->file->Close();
|
||||
|
@ -1351,7 +1351,7 @@ Module::SessionData::~SessionData() {
|
|||
Module::Interface::Interface(std::shared_ptr<Module> cecd, const char* name, u32 max_session)
|
||||
: ServiceFramework(name, max_session), cecd(std::move(cecd)) {}
|
||||
|
||||
Module::Module(Core::System& system) {
|
||||
Module::Module(Core::System& system) : system(system) {
|
||||
using namespace Kernel;
|
||||
cecinfo_event = system.Kernel().CreateEvent(Kernel::ResetType::OneShot, "CECD::cecinfo_event");
|
||||
change_state_event =
|
||||
|
|
|
@ -610,6 +610,8 @@ private:
|
|||
|
||||
Kernel::SharedPtr<Kernel::Event> cecinfo_event;
|
||||
Kernel::SharedPtr<Kernel::Event> change_state_event;
|
||||
|
||||
Core::System& system;
|
||||
};
|
||||
|
||||
/// Initialize CECD service(s)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue