Merge pull request #4224 from FearlessTobi/port-1310
Port #734 and #1310 from yuzu: Changes to Thread-related enums
This commit is contained in:
commit
f05740a5fd
13 changed files with 126 additions and 124 deletions
|
@ -107,7 +107,7 @@ void File::Read(Kernel::HLERequestContext& ctx) {
|
|||
std::chrono::nanoseconds read_timeout_ns{backend->GetReadDelayNs(length)};
|
||||
ctx.SleepClientThread(Kernel::GetCurrentThread(), "file::read", read_timeout_ns,
|
||||
[](Kernel::SharedPtr<Kernel::Thread> thread,
|
||||
Kernel::HLERequestContext& ctx, ThreadWakeupReason reason) {
|
||||
Kernel::HLERequestContext& ctx, Kernel::ThreadWakeupReason reason) {
|
||||
// Nothing to do here
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1161,7 +1161,7 @@ void NWM_UDS::ConnectToNetwork(Kernel::HLERequestContext& ctx) {
|
|||
connection_event = ctx.SleepClientThread(
|
||||
Kernel::GetCurrentThread(), "uds::ConnectToNetwork", UDSConnectionTimeout,
|
||||
[](Kernel::SharedPtr<Kernel::Thread> thread, Kernel::HLERequestContext& ctx,
|
||||
ThreadWakeupReason reason) {
|
||||
Kernel::ThreadWakeupReason reason) {
|
||||
// TODO(B3N30): Add error handling for host full and timeout
|
||||
IPC::RequestBuilder rb(ctx, 0x1E, 1, 0);
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
|
|
|
@ -198,11 +198,12 @@ void ServiceFrameworkBase::HandleSyncRequest(SharedPtr<ServerSession> server_ses
|
|||
handler_invoker(this, info->handler_callback, context);
|
||||
|
||||
auto thread = Kernel::GetCurrentThread();
|
||||
ASSERT(thread->status == THREADSTATUS_RUNNING || thread->status == THREADSTATUS_WAIT_HLE_EVENT);
|
||||
ASSERT(thread->status == Kernel::ThreadStatus::Running ||
|
||||
thread->status == Kernel::ThreadStatus::WaitHleEvent);
|
||||
// Only write the response immediately if the thread is still running. If the HLE handler put
|
||||
// the thread to sleep then the writing of the command buffer will be deferred to the wakeup
|
||||
// callback.
|
||||
if (thread->status == THREADSTATUS_RUNNING) {
|
||||
if (thread->status == Kernel::ThreadStatus::Running) {
|
||||
context.WriteToOutgoingCommandBuffer(cmd_buf, *Kernel::g_current_process,
|
||||
Kernel::g_handle_table);
|
||||
}
|
||||
|
|
|
@ -100,7 +100,8 @@ void SRV::GetServiceHandle(Kernel::HLERequestContext& ctx) {
|
|||
// TODO(yuriks): Permission checks go here
|
||||
|
||||
auto get_handle = [name, this](Kernel::SharedPtr<Kernel::Thread> thread,
|
||||
Kernel::HLERequestContext& ctx, ThreadWakeupReason reason) {
|
||||
Kernel::HLERequestContext& ctx,
|
||||
Kernel::ThreadWakeupReason reason) {
|
||||
LOG_ERROR(Service_SRV, "called service={} wakeup", name);
|
||||
auto client_port = service_manager->GetServicePort(name);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue