namespace sts -> namespace ams

namespace sts::ams -> ams::exosphere, ams::.

This is to facilitate future use of ams:: namespace code in
mesosphere, as we'll want to include ams::util, ams::result, ams::svc...
This commit is contained in:
Michael Scire
2019-10-24 02:30:10 -07:00
committed by SciresM
parent 4059dc6187
commit 8cb77ac136
397 changed files with 968 additions and 926 deletions

View File

@@ -19,7 +19,7 @@
#include "pm_process_info.hpp"
namespace sts::pm::impl {
namespace ams::pm::impl {
ProcessInfo::ProcessInfo(Handle h, os::ProcessId pid, ldr::PinId pin, const ncm::TitleLocation &l) : process_id(pid), pin_id(pin), loc(l), handle(h), state(ProcessState_Created), flags(0), waitable_holder(h) {
this->waitable_holder.SetUserData(reinterpret_cast<uintptr_t>(this));

View File

@@ -22,7 +22,7 @@
#include "pm_process_manager.hpp"
namespace sts::pm::impl {
namespace ams::pm::impl {
class ProcessList;

View File

@@ -25,7 +25,7 @@
#include "pm_process_info.hpp"
namespace sts::pm::impl {
namespace ams::pm::impl {
namespace {
@@ -133,7 +133,7 @@ namespace sts::pm::impl {
return static_cast<u32>(ProcessEventDeprecated::DebugRunning);
case ProcessEvent::DebugSuspended:
return static_cast<u32>(ProcessEventDeprecated::DebugSuspended);
STS_UNREACHABLE_DEFAULT_CASE();
AMS_UNREACHABLE_DEFAULT_CASE();
}
}
@@ -172,8 +172,8 @@ namespace sts::pm::impl {
std::scoped_lock lk(this->lock);
const size_t index = this->GetProcessInfoIndex(process_info);
STS_ASSERT(index < MaxProcessInfos);
STS_ASSERT(this->process_info_allocated[index]);
AMS_ASSERT(index < MaxProcessInfos);
AMS_ASSERT(this->process_info_allocated[index]);
process_info->~ProcessInfo();
this->process_info_allocated[index] = false;
@@ -315,7 +315,7 @@ namespace sts::pm::impl {
/* Make new process info. */
void *process_info_storage = g_process_info_allocator.AllocateProcessInfoStorage();
STS_ASSERT(process_info_storage != nullptr);
AMS_ASSERT(process_info_storage != nullptr);
ProcessInfo *process_info = new (process_info_storage) ProcessInfo(process_handle, process_id, pin_id, location);
/* Link new process info. */
@@ -716,7 +716,7 @@ namespace sts::pm::impl {
/* In 8.0.0, Nintendo added this command, which signals that the boot sysmodule has finished. */
/* Nintendo only signals it in safe mode FIRM, and this function aborts on normal FIRM. */
/* We will signal it always, but only allow this function to succeed on safe mode. */
STS_ASSERT(spl::IsRecoveryBoot());
AMS_ASSERT(spl::IsRecoveryBoot());
*out = g_boot_finished_event.GetReadableHandle();
return ResultSuccess();
}

View File

@@ -20,7 +20,7 @@
#include <stratosphere/ldr.hpp>
#include <stratosphere/pm.hpp>
namespace sts::pm::impl {
namespace ams::pm::impl {
/* Initialization. */
Result InitializeProcessManager();

View File

@@ -19,7 +19,7 @@
#include "pm_resource_manager.hpp"
namespace sts::pm::resource {
namespace ams::pm::resource {
namespace {
@@ -223,7 +223,7 @@ namespace sts::pm::resource {
g_resource_limits[ResourceLimitGroup_Applet][LimitableResource_Threads];
/* Ensure we don't over-commit threads. */
STS_ASSERT(total_threads_allocated <= total_threads_available);
AMS_ASSERT(total_threads_allocated <= total_threads_available);
/* Set number of extra threads. */
g_extra_application_threads_available = total_threads_available - total_threads_allocated;
@@ -247,7 +247,7 @@ namespace sts::pm::resource {
const u64 reserved_non_system_size = (application_size + applet_size + ReservedMemorySize600);
/* Ensure there's enough memory for the system region. */
STS_ASSERT(reserved_non_system_size < total_memory);
AMS_ASSERT(reserved_non_system_size < total_memory);
g_memory_resource_limits[spl::MemoryArrangement_Dynamic][ResourceLimitGroup_System] = total_memory - reserved_non_system_size;
} else {
@@ -343,8 +343,8 @@ namespace sts::pm::resource {
Result GetResourceLimitValues(u64 *out_cur, u64 *out_lim, ResourceLimitGroup group, LimitableResource resource) {
/* Do not allow out of bounds access. */
STS_ASSERT(group < ResourceLimitGroup_Count);
STS_ASSERT(resource < LimitableResource_Count);
AMS_ASSERT(group < ResourceLimitGroup_Count);
AMS_ASSERT(resource < LimitableResource_Count);
const Handle reslimit_hnd = GetResourceLimitHandle(group);
R_TRY(svcGetResourceLimitCurrentValue(out_cur, reslimit_hnd, resource));

View File

@@ -20,7 +20,7 @@
#include <stratosphere/ldr.hpp>
#include <stratosphere/pm.hpp>
namespace sts::pm::resource {
namespace ams::pm::resource {
/* Resource API. */
Result InitializeResourceManager();

View File

@@ -16,7 +16,7 @@
#include "pm_boot_mode_service.hpp"
namespace sts::pm::bm {
namespace ams::pm::bm {
namespace {

View File

@@ -19,7 +19,7 @@
#include <stratosphere.hpp>
#include <stratosphere/pm.hpp>
namespace sts::pm::bm {
namespace ams::pm::bm {
class BootModeService final : public sf::IServiceObject {
private:

View File

@@ -18,7 +18,7 @@
#include "pm_debug_monitor_service.hpp"
#include "impl/pm_process_manager.hpp"
namespace sts::pm::dmnt {
namespace ams::pm::dmnt {
/* Actual command implementations. */
Result DebugMonitorServiceBase::GetModuleIdList(sf::Out<u32> out_count, const sf::OutBuffer &out_buf, u64 unused) {

View File

@@ -20,7 +20,7 @@
#include <stratosphere/ldr.hpp>
#include <stratosphere/pm.hpp>
namespace sts::pm::dmnt {
namespace ams::pm::dmnt {
class DebugMonitorServiceBase : public sf::IServiceObject {
protected:

View File

@@ -20,7 +20,7 @@
#include "pm_info_service.hpp"
#include "impl/pm_process_manager.hpp"
namespace sts::pm::info {
namespace ams::pm::info {
/* Overrides for libstratosphere pm::info commands. */
Result HasLaunchedTitle(bool *out, ncm::TitleId title_id) {

View File

@@ -20,7 +20,7 @@
#include <stratosphere/ldr.hpp>
#include <stratosphere/pm.hpp>
namespace sts::pm::info {
namespace ams::pm::info {
class InformationService final : public sf::IServiceObject {
private:

View File

@@ -50,19 +50,19 @@ extern "C" {
void __libnx_exception_handler(ThreadExceptionDump *ctx);
}
namespace sts::ams {
namespace ams {
ncm::TitleId StratosphereTitleId = ncm::TitleId::Pm;
ncm::TitleId CurrentTitleId = ncm::TitleId::Pm;
namespace result {
bool CallFatalOnResultAssertion = false;
}
}
namespace sts::result {
bool CallFatalOnResultAssertion = false;
}
using namespace sts;
using namespace ams;
void __libnx_exception_handler(ThreadExceptionDump *ctx) {
ams::CrashHandler(ctx);
@@ -93,7 +93,7 @@ namespace {
/* Doing this here works around a bug fixed in 6.0.0. */
/* Not doing so will cause svcDebugActiveProcess to deadlock on lower firmwares if called for it's own process. */
if (process_id == os::GetCurrentProcessId()) {
return ams::StratosphereTitleId;
return ams::CurrentTitleId;
}
/* Get a debug handle. */

View File

@@ -17,7 +17,7 @@
#include "pm_shell_service.hpp"
#include "impl/pm_process_manager.hpp"
namespace sts::pm::shell {
namespace ams::pm::shell {
/* Overrides for libstratosphere pm::shell commands. */
Result LaunchTitle(os::ProcessId *out_process_id, const ncm::TitleLocation &loc, u32 launch_flags) {

View File

@@ -20,7 +20,7 @@
#include <stratosphere/ldr.hpp>
#include <stratosphere/pm.hpp>
namespace sts::pm::shell {
namespace ams::pm::shell {
class ShellServiceBase : public sf::IServiceObject {
protected: