mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-22 20:31:14 +00:00
pm: increase dmnt sessions. sm: remove session limit hack
This commit is contained in:
parent
d3bafc5b3b
commit
5448332009
2 changed files with 5 additions and 12 deletions
|
@ -163,23 +163,23 @@ namespace {
|
||||||
using ServerOptions = sf::hipc::DefaultServerManagerOptions;
|
using ServerOptions = sf::hipc::DefaultServerManagerOptions;
|
||||||
|
|
||||||
constexpr sm::ServiceName ShellServiceName = sm::ServiceName::Encode("pm:shell");
|
constexpr sm::ServiceName ShellServiceName = sm::ServiceName::Encode("pm:shell");
|
||||||
constexpr size_t ShellMaxSessions = 3;
|
constexpr size_t ShellMaxSessions = 8; /* Official maximum is 3. */
|
||||||
|
|
||||||
constexpr sm::ServiceName DebugMonitorServiceName = sm::ServiceName::Encode("pm:dmnt");
|
constexpr sm::ServiceName DebugMonitorServiceName = sm::ServiceName::Encode("pm:dmnt");
|
||||||
constexpr size_t DebugMonitorMaxSessions = 3;
|
constexpr size_t DebugMonitorMaxSessions = 16;
|
||||||
|
|
||||||
constexpr sm::ServiceName BootModeServiceName = sm::ServiceName::Encode("pm:bm");
|
constexpr sm::ServiceName BootModeServiceName = sm::ServiceName::Encode("pm:bm");
|
||||||
constexpr size_t BootModeMaxSessions = 6;
|
constexpr size_t BootModeMaxSessions = 8; /* Official maximum is 4. */
|
||||||
|
|
||||||
constexpr sm::ServiceName InformationServiceName = sm::ServiceName::Encode("pm:info");
|
constexpr sm::ServiceName InformationServiceName = sm::ServiceName::Encode("pm:info");
|
||||||
constexpr size_t InformationMaxSessions = 32 - (ShellMaxSessions + DebugMonitorMaxSessions + BootModeMaxSessions);
|
constexpr size_t InformationMaxSessions = 64 - (ShellMaxSessions + DebugMonitorMaxSessions + BootModeMaxSessions);
|
||||||
|
|
||||||
static_assert(InformationMaxSessions >= 16, "InformationMaxSessions");
|
static_assert(InformationMaxSessions >= 16, "InformationMaxSessions");
|
||||||
|
|
||||||
/* pm:shell, pm:dmnt, pm:bm, pm:info. */
|
/* pm:shell, pm:dmnt, pm:bm, pm:info. */
|
||||||
constexpr size_t NumServers = 4;
|
constexpr size_t NumServers = 4;
|
||||||
constexpr size_t MaxSessions = ShellMaxSessions + DebugMonitorMaxSessions + BootModeMaxSessions + InformationMaxSessions;
|
constexpr size_t MaxSessions = ShellMaxSessions + DebugMonitorMaxSessions + BootModeMaxSessions + InformationMaxSessions;
|
||||||
static_assert(MaxSessions == 32, "MaxSessions");
|
static_assert(MaxSessions == 64, "MaxSessions");
|
||||||
sf::hipc::ServerManager<NumServers, ServerOptions, MaxSessions> g_server_manager;
|
sf::hipc::ServerManager<NumServers, ServerOptions, MaxSessions> g_server_manager;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -399,13 +399,6 @@ namespace ams::sm::impl {
|
||||||
/* Don't try to register something already registered. */
|
/* Don't try to register something already registered. */
|
||||||
R_UNLESS(!HasServiceInfo(service), sm::ResultAlreadyRegistered());
|
R_UNLESS(!HasServiceInfo(service), sm::ResultAlreadyRegistered());
|
||||||
|
|
||||||
/* Adjust session limit, if compile flags tell us to. */
|
|
||||||
#ifdef SM_MINIMUM_SESSION_LIMIT
|
|
||||||
if (max_sessions < SM_MINIMUM_SESSION_LIMIT) {
|
|
||||||
max_sessions = SM_MINIMUM_SESSION_LIMIT;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Get free service. */
|
/* Get free service. */
|
||||||
ServiceInfo *free_service = GetFreeServiceInfo();
|
ServiceInfo *free_service = GetFreeServiceInfo();
|
||||||
R_UNLESS(free_service != nullptr, sm::ResultOutOfServices());
|
R_UNLESS(free_service != nullptr, sm::ResultOutOfServices());
|
||||||
|
|
Loading…
Reference in a new issue