mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-24 11:46:58 -04:00
kern: SvcConnectToNamedPort
This commit is contained in:
parent
a2eb93fde8
commit
7400a8ff68
15 changed files with 376 additions and 15 deletions
|
@ -34,11 +34,41 @@ namespace ams::kern {
|
|||
}
|
||||
|
||||
void KPort::OnClientClosed() {
|
||||
MESOSPHERE_UNIMPLEMENTED();
|
||||
MESOSPHERE_ASSERT_THIS();
|
||||
|
||||
KScopedSchedulerLock sl;
|
||||
|
||||
if (this->state == State::Normal) {
|
||||
this->state = State::ClientClosed;
|
||||
}
|
||||
}
|
||||
|
||||
void KPort::OnServerClosed() {
|
||||
MESOSPHERE_UNIMPLEMENTED();
|
||||
MESOSPHERE_ASSERT_THIS();
|
||||
|
||||
KScopedSchedulerLock sl;
|
||||
|
||||
if (this->state == State::Normal) {
|
||||
this->state = State::ServerClosed;
|
||||
}
|
||||
}
|
||||
|
||||
Result KPort::EnqueueSession(KServerSession *session) {
|
||||
KScopedSchedulerLock sl;
|
||||
|
||||
R_UNLESS(this->state == State::Normal, svc::ResultPortClosed());
|
||||
|
||||
this->server.EnqueueSession(session);
|
||||
return ResultSuccess();
|
||||
}
|
||||
|
||||
Result KPort::EnqueueSession(KLightServerSession *session) {
|
||||
KScopedSchedulerLock sl;
|
||||
|
||||
R_UNLESS(this->state == State::Normal, svc::ResultPortClosed());
|
||||
|
||||
this->server.EnqueueSession(session);
|
||||
return ResultSuccess();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue