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

@@ -16,7 +16,7 @@
#include <stratosphere.hpp>
#include "impl/os_waitable_object_list.hpp"
namespace sts::os {
namespace ams::os {
MessageQueue::MessageQueue(std::unique_ptr<uintptr_t[]> buf, size_t c): buffer(std::move(buf)), capacity(c) {
new (GetPointer(this->waitable_object_list_storage)) impl::WaitableObjectList();
@@ -28,7 +28,7 @@ namespace sts::os {
void MessageQueue::SendInternal(uintptr_t data) {
/* Ensure we don't corrupt the queue, but this should never happen. */
STS_ASSERT(this->count < this->capacity);
AMS_ASSERT(this->count < this->capacity);
/* Write data to tail of queue. */
this->buffer[(this->count++ + this->offset) % this->capacity] = data;
@@ -36,7 +36,7 @@ namespace sts::os {
void MessageQueue::SendNextInternal(uintptr_t data) {
/* Ensure we don't corrupt the queue, but this should never happen. */
STS_ASSERT(this->count < this->capacity);
AMS_ASSERT(this->count < this->capacity);
/* Write data to head of queue. */
this->offset = (this->offset + this->capacity - 1) % this->capacity;
@@ -46,7 +46,7 @@ namespace sts::os {
uintptr_t MessageQueue::ReceiveInternal() {
/* Ensure we don't corrupt the queue, but this should never happen. */
STS_ASSERT(this->count > 0);
AMS_ASSERT(this->count > 0);
uintptr_t data = this->buffer[this->offset];
this->offset = (this->offset + 1) % this->capacity;
@@ -56,7 +56,7 @@ namespace sts::os {
uintptr_t MessageQueue::PeekInternal() {
/* Ensure we don't corrupt the queue, but this should never happen. */
STS_ASSERT(this->count > 0);
AMS_ASSERT(this->count > 0);
return this->buffer[this->offset];
}