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:
@@ -16,7 +16,7 @@
|
||||
#include <stratosphere.hpp>
|
||||
#include "os_inter_process_event.hpp"
|
||||
|
||||
namespace sts::os::impl {
|
||||
namespace ams::os::impl {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace sts::os::impl {
|
||||
}
|
||||
|
||||
Result InterProcessEvent::Initialize(bool autoclear) {
|
||||
STS_ASSERT(!this->is_initialized);
|
||||
AMS_ASSERT(!this->is_initialized);
|
||||
Handle rh, wh;
|
||||
R_TRY(CreateEventHandles(&rh, &wh));
|
||||
this->Initialize(rh, true, wh, true, autoclear);
|
||||
@@ -48,8 +48,8 @@ namespace sts::os::impl {
|
||||
}
|
||||
|
||||
void InterProcessEvent::Initialize(Handle read_handle, bool manage_read_handle, Handle write_handle, bool manage_write_handle, bool autoclear) {
|
||||
STS_ASSERT(!this->is_initialized);
|
||||
STS_ASSERT(read_handle != INVALID_HANDLE || write_handle != INVALID_HANDLE);
|
||||
AMS_ASSERT(!this->is_initialized);
|
||||
AMS_ASSERT(read_handle != INVALID_HANDLE || write_handle != INVALID_HANDLE);
|
||||
this->read_handle = read_handle;
|
||||
this->manage_read_handle = manage_read_handle;
|
||||
this->write_handle = write_handle;
|
||||
@@ -59,30 +59,30 @@ namespace sts::os::impl {
|
||||
}
|
||||
|
||||
Handle InterProcessEvent::DetachReadableHandle() {
|
||||
STS_ASSERT(this->is_initialized);
|
||||
AMS_ASSERT(this->is_initialized);
|
||||
const Handle handle = this->read_handle;
|
||||
STS_ASSERT(handle != INVALID_HANDLE);
|
||||
AMS_ASSERT(handle != INVALID_HANDLE);
|
||||
this->read_handle = INVALID_HANDLE;
|
||||
this->manage_read_handle = false;
|
||||
return handle;
|
||||
}
|
||||
|
||||
Handle InterProcessEvent::DetachWritableHandle() {
|
||||
STS_ASSERT(this->is_initialized);
|
||||
AMS_ASSERT(this->is_initialized);
|
||||
const Handle handle = this->write_handle;
|
||||
STS_ASSERT(handle != INVALID_HANDLE);
|
||||
AMS_ASSERT(handle != INVALID_HANDLE);
|
||||
this->write_handle = INVALID_HANDLE;
|
||||
this->manage_write_handle = false;
|
||||
return handle;
|
||||
}
|
||||
|
||||
Handle InterProcessEvent::GetReadableHandle() const {
|
||||
STS_ASSERT(this->is_initialized);
|
||||
AMS_ASSERT(this->is_initialized);
|
||||
return this->read_handle;
|
||||
}
|
||||
|
||||
Handle InterProcessEvent::GetWritableHandle() const {
|
||||
STS_ASSERT(this->is_initialized);
|
||||
AMS_ASSERT(this->is_initialized);
|
||||
return this->write_handle;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#pragma once
|
||||
#include <stratosphere.hpp>
|
||||
|
||||
namespace sts::os::impl {
|
||||
namespace ams::os::impl {
|
||||
|
||||
class WaitableHolderOfInterProcessEvent;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#pragma once
|
||||
#include <stratosphere.hpp>
|
||||
|
||||
namespace sts::os::impl {
|
||||
namespace ams::os::impl {
|
||||
|
||||
class WaitableObjectList;
|
||||
class WaitableManagerImpl;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "os_waitable_holder_of_thread.hpp"
|
||||
#include "os_waitable_holder_of_message_queue.hpp"
|
||||
|
||||
namespace sts::os::impl {
|
||||
namespace ams::os::impl {
|
||||
|
||||
struct WaitableHolderImpl {
|
||||
union {
|
||||
@@ -36,7 +36,7 @@ namespace sts::os::impl {
|
||||
};
|
||||
|
||||
#define CHECK_HOLDER(T) \
|
||||
static_assert(std::is_base_of<::sts::os::impl::WaitableHolderBase, T>::value && std::is_trivially_destructible<T>::value, #T)
|
||||
static_assert(std::is_base_of<::ams::os::impl::WaitableHolderBase, T>::value && std::is_trivially_destructible<T>::value, #T)
|
||||
|
||||
CHECK_HOLDER(WaitableHolderOfHandle);
|
||||
CHECK_HOLDER(WaitableHolderOfEvent);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "os_waitable_holder_base.hpp"
|
||||
#include "os_waitable_object_list.hpp"
|
||||
|
||||
namespace sts::os::impl {
|
||||
namespace ams::os::impl {
|
||||
|
||||
class WaitableHolderOfEvent : public WaitableHolderOfUserObject {
|
||||
private:
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#pragma once
|
||||
#include "os_waitable_holder_base.hpp"
|
||||
|
||||
namespace sts::os::impl {
|
||||
namespace ams::os::impl {
|
||||
|
||||
class WaitableHolderOfHandle : public WaitableHolderOfKernelObject {
|
||||
private:
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "os_waitable_holder_base.hpp"
|
||||
#include "os_inter_process_event.hpp"
|
||||
|
||||
namespace sts::os::impl {
|
||||
namespace ams::os::impl {
|
||||
|
||||
class WaitableHolderOfInterProcessEvent : public WaitableHolderOfKernelObject {
|
||||
private:
|
||||
@@ -31,7 +31,7 @@ namespace sts::os::impl {
|
||||
}
|
||||
|
||||
virtual Handle GetHandle() const override {
|
||||
STS_ASSERT(this->event->is_initialized);
|
||||
AMS_ASSERT(this->event->is_initialized);
|
||||
return this->event->GetReadableHandle();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#pragma once
|
||||
#include "os_waitable_holder_base.hpp"
|
||||
|
||||
namespace sts::os::impl {
|
||||
namespace ams::os::impl {
|
||||
|
||||
class WaitableHolderOfInterruptEvent : public WaitableHolderOfKernelObject {
|
||||
private:
|
||||
@@ -30,7 +30,7 @@ namespace sts::os::impl {
|
||||
}
|
||||
|
||||
virtual Handle GetHandle() const override {
|
||||
STS_ASSERT(this->event->is_initialized);
|
||||
AMS_ASSERT(this->event->is_initialized);
|
||||
return this->event->handle.Get();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "os_waitable_holder_base.hpp"
|
||||
#include "os_waitable_object_list.hpp"
|
||||
|
||||
namespace sts::os::impl {
|
||||
namespace ams::os::impl {
|
||||
|
||||
template<MessageQueueWaitKind WaitKind>
|
||||
class WaitableHolderOfMessageQueue : public WaitableHolderOfUserObject {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#pragma once
|
||||
#include "os_waitable_holder_base.hpp"
|
||||
|
||||
namespace sts::os::impl {
|
||||
namespace ams::os::impl {
|
||||
|
||||
/* Nintendo implements this as a user wait object, operating on Thread state. */
|
||||
/* Libnx doesn't have an equivalent, so we'll use the thread's handle for kernel semantics. */
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "os_waitable_manager_impl.hpp"
|
||||
#include "os_waitable_object_list.hpp"
|
||||
|
||||
namespace sts::os::impl{
|
||||
namespace ams::os::impl{
|
||||
|
||||
WaitableHolderBase *WaitableManagerImpl::WaitAnyImpl(bool infinite, u64 timeout) {
|
||||
/* Set processing thread handle while in scope. */
|
||||
@@ -64,7 +64,7 @@ namespace sts::os::impl{
|
||||
index = WaitTimedOut;
|
||||
} else {
|
||||
index = this->WaitSynchronization(object_handles, count, min_timeout);
|
||||
STS_ASSERT(index != WaitInvalid);
|
||||
AMS_ASSERT(index != WaitInvalid);
|
||||
}
|
||||
|
||||
switch (index) {
|
||||
@@ -115,7 +115,7 @@ namespace sts::os::impl{
|
||||
|
||||
for (WaitableHolderBase &holder_base : this->waitable_list) {
|
||||
if (Handle handle = holder_base.GetHandle(); handle != INVALID_HANDLE) {
|
||||
STS_ASSERT(count < MaximumHandleCount);
|
||||
AMS_ASSERT(count < MaximumHandleCount);
|
||||
|
||||
out_handles[count] = handle;
|
||||
out_objects[count] = &holder_base;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#pragma once
|
||||
#include "os_waitable_holder_base.hpp"
|
||||
|
||||
namespace sts::os::impl {
|
||||
namespace ams::os::impl {
|
||||
|
||||
class WaitableManagerImpl {
|
||||
public:
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "os_waitable_holder_base.hpp"
|
||||
#include "os_waitable_manager_impl.hpp"
|
||||
|
||||
namespace sts::os::impl {
|
||||
namespace ams::os::impl {
|
||||
|
||||
class WaitableObjectList {
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user