diff options
| author | 2021-06-02 15:29:09 -0700 | |
|---|---|---|
| committer | 2021-06-02 15:29:09 -0700 | |
| commit | 4ea171fa5e50723d50b57b26aaaca2fac30eea57 (patch) | |
| tree | ef2f0869252f59b0b8aeb62a48e2a233c0f94664 /src/core/hle/kernel | |
| parent | Merge pull request #6403 from Kewlan/game-list-for-loop-optimization (diff) | |
| parent | general: Replace RESULT_UNKNOWN with ResultUnknown (diff) | |
| download | yuzu-4ea171fa5e50723d50b57b26aaaca2fac30eea57.tar.gz yuzu-4ea171fa5e50723d50b57b26aaaca2fac30eea57.tar.xz yuzu-4ea171fa5e50723d50b57b26aaaca2fac30eea57.zip | |
Merge pull request #6308 from Morph1984/result
general: Replace RESULT_NAME with ResultName
Diffstat (limited to 'src/core/hle/kernel')
25 files changed, 159 insertions, 159 deletions
diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp index 9d069a78f..2b5c30f7a 100644 --- a/src/core/hle/kernel/hle_ipc.cpp +++ b/src/core/hle/kernel/hle_ipc.cpp | |||
| @@ -169,12 +169,12 @@ ResultCode HLERequestContext::PopulateFromIncomingCommandBuffer(const KHandleTab | |||
| 169 | 169 | ||
| 170 | if (command_header->IsCloseCommand()) { | 170 | if (command_header->IsCloseCommand()) { |
| 171 | // Close does not populate the rest of the IPC header | 171 | // Close does not populate the rest of the IPC header |
| 172 | return RESULT_SUCCESS; | 172 | return ResultSuccess; |
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | std::copy_n(src_cmdbuf, IPC::COMMAND_BUFFER_LENGTH, cmd_buf.begin()); | 175 | std::copy_n(src_cmdbuf, IPC::COMMAND_BUFFER_LENGTH, cmd_buf.begin()); |
| 176 | 176 | ||
| 177 | return RESULT_SUCCESS; | 177 | return ResultSuccess; |
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | ResultCode HLERequestContext::WriteToOutgoingCommandBuffer(KThread& requesting_thread) { | 180 | ResultCode HLERequestContext::WriteToOutgoingCommandBuffer(KThread& requesting_thread) { |
| @@ -216,7 +216,7 @@ ResultCode HLERequestContext::WriteToOutgoingCommandBuffer(KThread& requesting_t | |||
| 216 | memory.WriteBlock(owner_process, requesting_thread.GetTLSAddress(), cmd_buf.data(), | 216 | memory.WriteBlock(owner_process, requesting_thread.GetTLSAddress(), cmd_buf.data(), |
| 217 | write_size * sizeof(u32)); | 217 | write_size * sizeof(u32)); |
| 218 | 218 | ||
| 219 | return RESULT_SUCCESS; | 219 | return ResultSuccess; |
| 220 | } | 220 | } |
| 221 | 221 | ||
| 222 | std::vector<u8> HLERequestContext::ReadBuffer(std::size_t buffer_index) const { | 222 | std::vector<u8> HLERequestContext::ReadBuffer(std::size_t buffer_index) const { |
diff --git a/src/core/hle/kernel/k_address_arbiter.cpp b/src/core/hle/kernel/k_address_arbiter.cpp index 7018f56da..1b429bc1e 100644 --- a/src/core/hle/kernel/k_address_arbiter.cpp +++ b/src/core/hle/kernel/k_address_arbiter.cpp | |||
| @@ -97,7 +97,7 @@ ResultCode KAddressArbiter::Signal(VAddr addr, s32 count) { | |||
| 97 | while ((it != thread_tree.end()) && (count <= 0 || num_waiters < count) && | 97 | while ((it != thread_tree.end()) && (count <= 0 || num_waiters < count) && |
| 98 | (it->GetAddressArbiterKey() == addr)) { | 98 | (it->GetAddressArbiterKey() == addr)) { |
| 99 | KThread* target_thread = std::addressof(*it); | 99 | KThread* target_thread = std::addressof(*it); |
| 100 | target_thread->SetSyncedObject(nullptr, RESULT_SUCCESS); | 100 | target_thread->SetSyncedObject(nullptr, ResultSuccess); |
| 101 | 101 | ||
| 102 | ASSERT(target_thread->IsWaitingForAddressArbiter()); | 102 | ASSERT(target_thread->IsWaitingForAddressArbiter()); |
| 103 | target_thread->Wakeup(); | 103 | target_thread->Wakeup(); |
| @@ -107,7 +107,7 @@ ResultCode KAddressArbiter::Signal(VAddr addr, s32 count) { | |||
| 107 | ++num_waiters; | 107 | ++num_waiters; |
| 108 | } | 108 | } |
| 109 | } | 109 | } |
| 110 | return RESULT_SUCCESS; | 110 | return ResultSuccess; |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | ResultCode KAddressArbiter::SignalAndIncrementIfEqual(VAddr addr, s32 value, s32 count) { | 113 | ResultCode KAddressArbiter::SignalAndIncrementIfEqual(VAddr addr, s32 value, s32 count) { |
| @@ -130,7 +130,7 @@ ResultCode KAddressArbiter::SignalAndIncrementIfEqual(VAddr addr, s32 value, s32 | |||
| 130 | while ((it != thread_tree.end()) && (count <= 0 || num_waiters < count) && | 130 | while ((it != thread_tree.end()) && (count <= 0 || num_waiters < count) && |
| 131 | (it->GetAddressArbiterKey() == addr)) { | 131 | (it->GetAddressArbiterKey() == addr)) { |
| 132 | KThread* target_thread = std::addressof(*it); | 132 | KThread* target_thread = std::addressof(*it); |
| 133 | target_thread->SetSyncedObject(nullptr, RESULT_SUCCESS); | 133 | target_thread->SetSyncedObject(nullptr, ResultSuccess); |
| 134 | 134 | ||
| 135 | ASSERT(target_thread->IsWaitingForAddressArbiter()); | 135 | ASSERT(target_thread->IsWaitingForAddressArbiter()); |
| 136 | target_thread->Wakeup(); | 136 | target_thread->Wakeup(); |
| @@ -140,7 +140,7 @@ ResultCode KAddressArbiter::SignalAndIncrementIfEqual(VAddr addr, s32 value, s32 | |||
| 140 | ++num_waiters; | 140 | ++num_waiters; |
| 141 | } | 141 | } |
| 142 | } | 142 | } |
| 143 | return RESULT_SUCCESS; | 143 | return ResultSuccess; |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | ResultCode KAddressArbiter::SignalAndModifyByWaitingCountIfEqual(VAddr addr, s32 value, s32 count) { | 146 | ResultCode KAddressArbiter::SignalAndModifyByWaitingCountIfEqual(VAddr addr, s32 value, s32 count) { |
| @@ -198,7 +198,7 @@ ResultCode KAddressArbiter::SignalAndModifyByWaitingCountIfEqual(VAddr addr, s32 | |||
| 198 | while ((it != thread_tree.end()) && (count <= 0 || num_waiters < count) && | 198 | while ((it != thread_tree.end()) && (count <= 0 || num_waiters < count) && |
| 199 | (it->GetAddressArbiterKey() == addr)) { | 199 | (it->GetAddressArbiterKey() == addr)) { |
| 200 | KThread* target_thread = std::addressof(*it); | 200 | KThread* target_thread = std::addressof(*it); |
| 201 | target_thread->SetSyncedObject(nullptr, RESULT_SUCCESS); | 201 | target_thread->SetSyncedObject(nullptr, ResultSuccess); |
| 202 | 202 | ||
| 203 | ASSERT(target_thread->IsWaitingForAddressArbiter()); | 203 | ASSERT(target_thread->IsWaitingForAddressArbiter()); |
| 204 | target_thread->Wakeup(); | 204 | target_thread->Wakeup(); |
| @@ -208,7 +208,7 @@ ResultCode KAddressArbiter::SignalAndModifyByWaitingCountIfEqual(VAddr addr, s32 | |||
| 208 | ++num_waiters; | 208 | ++num_waiters; |
| 209 | } | 209 | } |
| 210 | } | 210 | } |
| 211 | return RESULT_SUCCESS; | 211 | return ResultSuccess; |
| 212 | } | 212 | } |
| 213 | 213 | ||
| 214 | ResultCode KAddressArbiter::WaitIfLessThan(VAddr addr, s32 value, bool decrement, s64 timeout) { | 214 | ResultCode KAddressArbiter::WaitIfLessThan(VAddr addr, s32 value, bool decrement, s64 timeout) { |
diff --git a/src/core/hle/kernel/k_address_arbiter.h b/src/core/hle/kernel/k_address_arbiter.h index 8d379b524..bf8b46665 100644 --- a/src/core/hle/kernel/k_address_arbiter.h +++ b/src/core/hle/kernel/k_address_arbiter.h | |||
| @@ -37,7 +37,7 @@ public: | |||
| 37 | return SignalAndModifyByWaitingCountIfEqual(addr, value, count); | 37 | return SignalAndModifyByWaitingCountIfEqual(addr, value, count); |
| 38 | } | 38 | } |
| 39 | UNREACHABLE(); | 39 | UNREACHABLE(); |
| 40 | return RESULT_UNKNOWN; | 40 | return ResultUnknown; |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | [[nodiscard]] ResultCode WaitForAddress(VAddr addr, Svc::ArbitrationType type, s32 value, | 43 | [[nodiscard]] ResultCode WaitForAddress(VAddr addr, Svc::ArbitrationType type, s32 value, |
| @@ -51,7 +51,7 @@ public: | |||
| 51 | return WaitIfEqual(addr, value, timeout); | 51 | return WaitIfEqual(addr, value, timeout); |
| 52 | } | 52 | } |
| 53 | UNREACHABLE(); | 53 | UNREACHABLE(); |
| 54 | return RESULT_UNKNOWN; | 54 | return ResultUnknown; |
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | private: | 57 | private: |
diff --git a/src/core/hle/kernel/k_client_port.cpp b/src/core/hle/kernel/k_client_port.cpp index 4a12dee10..23d830d1f 100644 --- a/src/core/hle/kernel/k_client_port.cpp +++ b/src/core/hle/kernel/k_client_port.cpp | |||
| @@ -119,7 +119,7 @@ ResultCode KClientPort::CreateSession(KClientSession** out) { | |||
| 119 | // We succeeded, so set the output. | 119 | // We succeeded, so set the output. |
| 120 | session_guard.Cancel(); | 120 | session_guard.Cancel(); |
| 121 | *out = std::addressof(session->GetClientSession()); | 121 | *out = std::addressof(session->GetClientSession()); |
| 122 | return RESULT_SUCCESS; | 122 | return ResultSuccess; |
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | } // namespace Kernel | 125 | } // namespace Kernel |
diff --git a/src/core/hle/kernel/k_condition_variable.cpp b/src/core/hle/kernel/k_condition_variable.cpp index ce3bade60..ef14ad1d2 100644 --- a/src/core/hle/kernel/k_condition_variable.cpp +++ b/src/core/hle/kernel/k_condition_variable.cpp | |||
| @@ -86,7 +86,7 @@ ResultCode KConditionVariable::SignalToAddress(VAddr addr) { | |||
| 86 | next_value |= Svc::HandleWaitMask; | 86 | next_value |= Svc::HandleWaitMask; |
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | next_owner_thread->SetSyncedObject(nullptr, RESULT_SUCCESS); | 89 | next_owner_thread->SetSyncedObject(nullptr, ResultSuccess); |
| 90 | next_owner_thread->Wakeup(); | 90 | next_owner_thread->Wakeup(); |
| 91 | } | 91 | } |
| 92 | 92 | ||
| @@ -100,7 +100,7 @@ ResultCode KConditionVariable::SignalToAddress(VAddr addr) { | |||
| 100 | } | 100 | } |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | return RESULT_SUCCESS; | 103 | return ResultSuccess; |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | ResultCode KConditionVariable::WaitForAddress(Handle handle, VAddr addr, u32 value) { | 106 | ResultCode KConditionVariable::WaitForAddress(Handle handle, VAddr addr, u32 value) { |
| @@ -112,7 +112,7 @@ ResultCode KConditionVariable::WaitForAddress(Handle handle, VAddr addr, u32 val | |||
| 112 | ASSERT(owner_thread.IsNull()); | 112 | ASSERT(owner_thread.IsNull()); |
| 113 | { | 113 | { |
| 114 | KScopedSchedulerLock sl(kernel); | 114 | KScopedSchedulerLock sl(kernel); |
| 115 | cur_thread->SetSyncedObject(nullptr, RESULT_SUCCESS); | 115 | cur_thread->SetSyncedObject(nullptr, ResultSuccess); |
| 116 | 116 | ||
| 117 | // Check if the thread should terminate. | 117 | // Check if the thread should terminate. |
| 118 | R_UNLESS(!cur_thread->IsTerminationRequested(), ResultTerminationRequested); | 118 | R_UNLESS(!cur_thread->IsTerminationRequested(), ResultTerminationRequested); |
| @@ -124,7 +124,7 @@ ResultCode KConditionVariable::WaitForAddress(Handle handle, VAddr addr, u32 val | |||
| 124 | ResultInvalidCurrentMemory); | 124 | ResultInvalidCurrentMemory); |
| 125 | 125 | ||
| 126 | // If the tag isn't the handle (with wait mask), we're done. | 126 | // If the tag isn't the handle (with wait mask), we're done. |
| 127 | R_UNLESS(test_tag == (handle | Svc::HandleWaitMask), RESULT_SUCCESS); | 127 | R_UNLESS(test_tag == (handle | Svc::HandleWaitMask), ResultSuccess); |
| 128 | 128 | ||
| 129 | // Get the lock owner thread. | 129 | // Get the lock owner thread. |
| 130 | owner_thread = | 130 | owner_thread = |
| @@ -181,7 +181,7 @@ KThread* KConditionVariable::SignalImpl(KThread* thread) { | |||
| 181 | if (can_access) { | 181 | if (can_access) { |
| 182 | if (prev_tag == Svc::InvalidHandle) { | 182 | if (prev_tag == Svc::InvalidHandle) { |
| 183 | // If nobody held the lock previously, we're all good. | 183 | // If nobody held the lock previously, we're all good. |
| 184 | thread->SetSyncedObject(nullptr, RESULT_SUCCESS); | 184 | thread->SetSyncedObject(nullptr, ResultSuccess); |
| 185 | thread->Wakeup(); | 185 | thread->Wakeup(); |
| 186 | } else { | 186 | } else { |
| 187 | // Get the previous owner. | 187 | // Get the previous owner. |
| @@ -292,7 +292,7 @@ ResultCode KConditionVariable::Wait(VAddr addr, u64 key, u32 value, s64 timeout) | |||
| 292 | } | 292 | } |
| 293 | 293 | ||
| 294 | // Wake up the next owner. | 294 | // Wake up the next owner. |
| 295 | next_owner_thread->SetSyncedObject(nullptr, RESULT_SUCCESS); | 295 | next_owner_thread->SetSyncedObject(nullptr, ResultSuccess); |
| 296 | next_owner_thread->Wakeup(); | 296 | next_owner_thread->Wakeup(); |
| 297 | } | 297 | } |
| 298 | 298 | ||
diff --git a/src/core/hle/kernel/k_handle_table.cpp b/src/core/hle/kernel/k_handle_table.cpp index 0378447f6..6a420d5b0 100644 --- a/src/core/hle/kernel/k_handle_table.cpp +++ b/src/core/hle/kernel/k_handle_table.cpp | |||
| @@ -25,7 +25,7 @@ ResultCode KHandleTable::Finalize() { | |||
| 25 | } | 25 | } |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | return RESULT_SUCCESS; | 28 | return ResultSuccess; |
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | bool KHandleTable::Remove(Handle handle) { | 31 | bool KHandleTable::Remove(Handle handle) { |
| @@ -79,7 +79,7 @@ ResultCode KHandleTable::Add(Handle* out_handle, KAutoObject* obj, u16 type) { | |||
| 79 | *out_handle = EncodeHandle(static_cast<u16>(index), linear_id); | 79 | *out_handle = EncodeHandle(static_cast<u16>(index), linear_id); |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | return RESULT_SUCCESS; | 82 | return ResultSuccess; |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | ResultCode KHandleTable::Reserve(Handle* out_handle) { | 85 | ResultCode KHandleTable::Reserve(Handle* out_handle) { |
| @@ -89,7 +89,7 @@ ResultCode KHandleTable::Reserve(Handle* out_handle) { | |||
| 89 | R_UNLESS(m_count < m_table_size, ResultOutOfHandles); | 89 | R_UNLESS(m_count < m_table_size, ResultOutOfHandles); |
| 90 | 90 | ||
| 91 | *out_handle = EncodeHandle(static_cast<u16>(this->AllocateEntry()), this->AllocateLinearId()); | 91 | *out_handle = EncodeHandle(static_cast<u16>(this->AllocateEntry()), this->AllocateLinearId()); |
| 92 | return RESULT_SUCCESS; | 92 | return ResultSuccess; |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | void KHandleTable::Unreserve(Handle handle) { | 95 | void KHandleTable::Unreserve(Handle handle) { |
diff --git a/src/core/hle/kernel/k_handle_table.h b/src/core/hle/kernel/k_handle_table.h index ba9dd061d..2ff6aa160 100644 --- a/src/core/hle/kernel/k_handle_table.h +++ b/src/core/hle/kernel/k_handle_table.h | |||
| @@ -50,7 +50,7 @@ public: | |||
| 50 | m_free_head_index = i; | 50 | m_free_head_index = i; |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | return RESULT_SUCCESS; | 53 | return ResultSuccess; |
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | size_t GetTableSize() const { | 56 | size_t GetTableSize() const { |
diff --git a/src/core/hle/kernel/k_memory_manager.cpp b/src/core/hle/kernel/k_memory_manager.cpp index aa71697b2..0166df0a5 100644 --- a/src/core/hle/kernel/k_memory_manager.cpp +++ b/src/core/hle/kernel/k_memory_manager.cpp | |||
| @@ -86,7 +86,7 @@ ResultCode KMemoryManager::Allocate(KPageLinkedList& page_list, std::size_t num_ | |||
| 86 | 86 | ||
| 87 | // Early return if we're allocating no pages | 87 | // Early return if we're allocating no pages |
| 88 | if (num_pages == 0) { | 88 | if (num_pages == 0) { |
| 89 | return RESULT_SUCCESS; | 89 | return ResultSuccess; |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | // Lock the pool that we're allocating from | 92 | // Lock the pool that we're allocating from |
| @@ -146,14 +146,14 @@ ResultCode KMemoryManager::Allocate(KPageLinkedList& page_list, std::size_t num_ | |||
| 146 | 146 | ||
| 147 | // We succeeded! | 147 | // We succeeded! |
| 148 | group_guard.Cancel(); | 148 | group_guard.Cancel(); |
| 149 | return RESULT_SUCCESS; | 149 | return ResultSuccess; |
| 150 | } | 150 | } |
| 151 | 151 | ||
| 152 | ResultCode KMemoryManager::Free(KPageLinkedList& page_list, std::size_t num_pages, Pool pool, | 152 | ResultCode KMemoryManager::Free(KPageLinkedList& page_list, std::size_t num_pages, Pool pool, |
| 153 | Direction dir) { | 153 | Direction dir) { |
| 154 | // Early return if we're freeing no pages | 154 | // Early return if we're freeing no pages |
| 155 | if (!num_pages) { | 155 | if (!num_pages) { |
| 156 | return RESULT_SUCCESS; | 156 | return ResultSuccess; |
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | // Lock the pool that we're freeing from | 159 | // Lock the pool that we're freeing from |
| @@ -170,7 +170,7 @@ ResultCode KMemoryManager::Free(KPageLinkedList& page_list, std::size_t num_page | |||
| 170 | chosen_manager.Free(it.GetAddress(), min_num_pages); | 170 | chosen_manager.Free(it.GetAddress(), min_num_pages); |
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | return RESULT_SUCCESS; | 173 | return ResultSuccess; |
| 174 | } | 174 | } |
| 175 | 175 | ||
| 176 | std::size_t KMemoryManager::Impl::CalculateManagementOverheadSize(std::size_t region_size) { | 176 | std::size_t KMemoryManager::Impl::CalculateManagementOverheadSize(std::size_t region_size) { |
diff --git a/src/core/hle/kernel/k_page_linked_list.h b/src/core/hle/kernel/k_page_linked_list.h index dfdac5321..3362fb236 100644 --- a/src/core/hle/kernel/k_page_linked_list.h +++ b/src/core/hle/kernel/k_page_linked_list.h | |||
| @@ -71,7 +71,7 @@ public: | |||
| 71 | 71 | ||
| 72 | ResultCode AddBlock(u64 address, u64 num_pages) { | 72 | ResultCode AddBlock(u64 address, u64 num_pages) { |
| 73 | if (!num_pages) { | 73 | if (!num_pages) { |
| 74 | return RESULT_SUCCESS; | 74 | return ResultSuccess; |
| 75 | } | 75 | } |
| 76 | if (!nodes.empty()) { | 76 | if (!nodes.empty()) { |
| 77 | const auto node = nodes.back(); | 77 | const auto node = nodes.back(); |
| @@ -82,7 +82,7 @@ public: | |||
| 82 | } | 82 | } |
| 83 | } | 83 | } |
| 84 | nodes.push_back({address, num_pages}); | 84 | nodes.push_back({address, num_pages}); |
| 85 | return RESULT_SUCCESS; | 85 | return ResultSuccess; |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | private: | 88 | private: |
diff --git a/src/core/hle/kernel/k_page_table.cpp b/src/core/hle/kernel/k_page_table.cpp index 27dbf0ebc..66d260635 100644 --- a/src/core/hle/kernel/k_page_table.cpp +++ b/src/core/hle/kernel/k_page_table.cpp | |||
| @@ -292,7 +292,7 @@ ResultCode KPageTable::MapProcessCode(VAddr addr, std::size_t num_pages, KMemory | |||
| 292 | 292 | ||
| 293 | block_manager->Update(addr, num_pages, state, perm); | 293 | block_manager->Update(addr, num_pages, state, perm); |
| 294 | 294 | ||
| 295 | return RESULT_SUCCESS; | 295 | return ResultSuccess; |
| 296 | } | 296 | } |
| 297 | 297 | ||
| 298 | ResultCode KPageTable::MapProcessCodeMemory(VAddr dst_addr, VAddr src_addr, std::size_t size) { | 298 | ResultCode KPageTable::MapProcessCodeMemory(VAddr dst_addr, VAddr src_addr, std::size_t size) { |
| @@ -329,14 +329,14 @@ ResultCode KPageTable::MapProcessCodeMemory(VAddr dst_addr, VAddr src_addr, std: | |||
| 329 | KMemoryAttribute::Locked); | 329 | KMemoryAttribute::Locked); |
| 330 | block_manager->Update(dst_addr, num_pages, KMemoryState::AliasCode); | 330 | block_manager->Update(dst_addr, num_pages, KMemoryState::AliasCode); |
| 331 | 331 | ||
| 332 | return RESULT_SUCCESS; | 332 | return ResultSuccess; |
| 333 | } | 333 | } |
| 334 | 334 | ||
| 335 | ResultCode KPageTable::UnmapProcessCodeMemory(VAddr dst_addr, VAddr src_addr, std::size_t size) { | 335 | ResultCode KPageTable::UnmapProcessCodeMemory(VAddr dst_addr, VAddr src_addr, std::size_t size) { |
| 336 | std::lock_guard lock{page_table_lock}; | 336 | std::lock_guard lock{page_table_lock}; |
| 337 | 337 | ||
| 338 | if (!size) { | 338 | if (!size) { |
| 339 | return RESULT_SUCCESS; | 339 | return ResultSuccess; |
| 340 | } | 340 | } |
| 341 | 341 | ||
| 342 | const std::size_t num_pages{size / PageSize}; | 342 | const std::size_t num_pages{size / PageSize}; |
| @@ -360,7 +360,7 @@ ResultCode KPageTable::UnmapProcessCodeMemory(VAddr dst_addr, VAddr src_addr, st | |||
| 360 | block_manager->Update(src_addr, num_pages, KMemoryState::Normal, | 360 | block_manager->Update(src_addr, num_pages, KMemoryState::Normal, |
| 361 | KMemoryPermission::ReadAndWrite); | 361 | KMemoryPermission::ReadAndWrite); |
| 362 | 362 | ||
| 363 | return RESULT_SUCCESS; | 363 | return ResultSuccess; |
| 364 | } | 364 | } |
| 365 | 365 | ||
| 366 | void KPageTable::MapPhysicalMemory(KPageLinkedList& page_linked_list, VAddr start, VAddr end) { | 366 | void KPageTable::MapPhysicalMemory(KPageLinkedList& page_linked_list, VAddr start, VAddr end) { |
| @@ -408,7 +408,7 @@ ResultCode KPageTable::MapPhysicalMemory(VAddr addr, std::size_t size) { | |||
| 408 | }); | 408 | }); |
| 409 | 409 | ||
| 410 | if (mapped_size == size) { | 410 | if (mapped_size == size) { |
| 411 | return RESULT_SUCCESS; | 411 | return ResultSuccess; |
| 412 | } | 412 | } |
| 413 | 413 | ||
| 414 | const std::size_t remaining_size{size - mapped_size}; | 414 | const std::size_t remaining_size{size - mapped_size}; |
| @@ -440,14 +440,14 @@ ResultCode KPageTable::MapPhysicalMemory(VAddr addr, std::size_t size) { | |||
| 440 | KMemoryAttribute::None, KMemoryState::Normal, | 440 | KMemoryAttribute::None, KMemoryState::Normal, |
| 441 | KMemoryPermission::ReadAndWrite, KMemoryAttribute::None); | 441 | KMemoryPermission::ReadAndWrite, KMemoryAttribute::None); |
| 442 | 442 | ||
| 443 | return RESULT_SUCCESS; | 443 | return ResultSuccess; |
| 444 | } | 444 | } |
| 445 | 445 | ||
| 446 | ResultCode KPageTable::UnmapPhysicalMemory(VAddr addr, std::size_t size) { | 446 | ResultCode KPageTable::UnmapPhysicalMemory(VAddr addr, std::size_t size) { |
| 447 | std::lock_guard lock{page_table_lock}; | 447 | std::lock_guard lock{page_table_lock}; |
| 448 | 448 | ||
| 449 | const VAddr end_addr{addr + size}; | 449 | const VAddr end_addr{addr + size}; |
| 450 | ResultCode result{RESULT_SUCCESS}; | 450 | ResultCode result{ResultSuccess}; |
| 451 | std::size_t mapped_size{}; | 451 | std::size_t mapped_size{}; |
| 452 | 452 | ||
| 453 | // Verify that the region can be unmapped | 453 | // Verify that the region can be unmapped |
| @@ -468,7 +468,7 @@ ResultCode KPageTable::UnmapPhysicalMemory(VAddr addr, std::size_t size) { | |||
| 468 | } | 468 | } |
| 469 | 469 | ||
| 470 | if (!mapped_size) { | 470 | if (!mapped_size) { |
| 471 | return RESULT_SUCCESS; | 471 | return ResultSuccess; |
| 472 | } | 472 | } |
| 473 | 473 | ||
| 474 | CASCADE_CODE(UnmapMemory(addr, size)); | 474 | CASCADE_CODE(UnmapMemory(addr, size)); |
| @@ -477,14 +477,14 @@ ResultCode KPageTable::UnmapPhysicalMemory(VAddr addr, std::size_t size) { | |||
| 477 | process->GetResourceLimit()->Release(LimitableResource::PhysicalMemory, mapped_size); | 477 | process->GetResourceLimit()->Release(LimitableResource::PhysicalMemory, mapped_size); |
| 478 | physical_memory_usage -= mapped_size; | 478 | physical_memory_usage -= mapped_size; |
| 479 | 479 | ||
| 480 | return RESULT_SUCCESS; | 480 | return ResultSuccess; |
| 481 | } | 481 | } |
| 482 | 482 | ||
| 483 | ResultCode KPageTable::UnmapMemory(VAddr addr, std::size_t size) { | 483 | ResultCode KPageTable::UnmapMemory(VAddr addr, std::size_t size) { |
| 484 | std::lock_guard lock{page_table_lock}; | 484 | std::lock_guard lock{page_table_lock}; |
| 485 | 485 | ||
| 486 | const VAddr end_addr{addr + size}; | 486 | const VAddr end_addr{addr + size}; |
| 487 | ResultCode result{RESULT_SUCCESS}; | 487 | ResultCode result{ResultSuccess}; |
| 488 | KPageLinkedList page_linked_list; | 488 | KPageLinkedList page_linked_list; |
| 489 | 489 | ||
| 490 | // Unmap each region within the range | 490 | // Unmap each region within the range |
| @@ -513,7 +513,7 @@ ResultCode KPageTable::UnmapMemory(VAddr addr, std::size_t size) { | |||
| 513 | 513 | ||
| 514 | block_manager->Update(addr, num_pages, KMemoryState::Free); | 514 | block_manager->Update(addr, num_pages, KMemoryState::Free); |
| 515 | 515 | ||
| 516 | return RESULT_SUCCESS; | 516 | return ResultSuccess; |
| 517 | } | 517 | } |
| 518 | 518 | ||
| 519 | ResultCode KPageTable::Map(VAddr dst_addr, VAddr src_addr, std::size_t size) { | 519 | ResultCode KPageTable::Map(VAddr dst_addr, VAddr src_addr, std::size_t size) { |
| @@ -552,7 +552,7 @@ ResultCode KPageTable::Map(VAddr dst_addr, VAddr src_addr, std::size_t size) { | |||
| 552 | block_manager->Update(dst_addr, num_pages, KMemoryState::Stack, | 552 | block_manager->Update(dst_addr, num_pages, KMemoryState::Stack, |
| 553 | KMemoryPermission::ReadAndWrite); | 553 | KMemoryPermission::ReadAndWrite); |
| 554 | 554 | ||
| 555 | return RESULT_SUCCESS; | 555 | return ResultSuccess; |
| 556 | } | 556 | } |
| 557 | 557 | ||
| 558 | ResultCode KPageTable::Unmap(VAddr dst_addr, VAddr src_addr, std::size_t size) { | 558 | ResultCode KPageTable::Unmap(VAddr dst_addr, VAddr src_addr, std::size_t size) { |
| @@ -594,7 +594,7 @@ ResultCode KPageTable::Unmap(VAddr dst_addr, VAddr src_addr, std::size_t size) { | |||
| 594 | block_manager->Update(src_addr, num_pages, src_state, KMemoryPermission::ReadAndWrite); | 594 | block_manager->Update(src_addr, num_pages, src_state, KMemoryPermission::ReadAndWrite); |
| 595 | block_manager->Update(dst_addr, num_pages, KMemoryState::Free); | 595 | block_manager->Update(dst_addr, num_pages, KMemoryState::Free); |
| 596 | 596 | ||
| 597 | return RESULT_SUCCESS; | 597 | return ResultSuccess; |
| 598 | } | 598 | } |
| 599 | 599 | ||
| 600 | ResultCode KPageTable::MapPages(VAddr addr, const KPageLinkedList& page_linked_list, | 600 | ResultCode KPageTable::MapPages(VAddr addr, const KPageLinkedList& page_linked_list, |
| @@ -616,7 +616,7 @@ ResultCode KPageTable::MapPages(VAddr addr, const KPageLinkedList& page_linked_l | |||
| 616 | cur_addr += node.GetNumPages() * PageSize; | 616 | cur_addr += node.GetNumPages() * PageSize; |
| 617 | } | 617 | } |
| 618 | 618 | ||
| 619 | return RESULT_SUCCESS; | 619 | return ResultSuccess; |
| 620 | } | 620 | } |
| 621 | 621 | ||
| 622 | ResultCode KPageTable::MapPages(VAddr addr, KPageLinkedList& page_linked_list, KMemoryState state, | 622 | ResultCode KPageTable::MapPages(VAddr addr, KPageLinkedList& page_linked_list, KMemoryState state, |
| @@ -638,7 +638,7 @@ ResultCode KPageTable::MapPages(VAddr addr, KPageLinkedList& page_linked_list, K | |||
| 638 | 638 | ||
| 639 | block_manager->Update(addr, num_pages, state, perm); | 639 | block_manager->Update(addr, num_pages, state, perm); |
| 640 | 640 | ||
| 641 | return RESULT_SUCCESS; | 641 | return ResultSuccess; |
| 642 | } | 642 | } |
| 643 | 643 | ||
| 644 | ResultCode KPageTable::UnmapPages(VAddr addr, const KPageLinkedList& page_linked_list) { | 644 | ResultCode KPageTable::UnmapPages(VAddr addr, const KPageLinkedList& page_linked_list) { |
| @@ -655,7 +655,7 @@ ResultCode KPageTable::UnmapPages(VAddr addr, const KPageLinkedList& page_linked | |||
| 655 | cur_addr += node.GetNumPages() * PageSize; | 655 | cur_addr += node.GetNumPages() * PageSize; |
| 656 | } | 656 | } |
| 657 | 657 | ||
| 658 | return RESULT_SUCCESS; | 658 | return ResultSuccess; |
| 659 | } | 659 | } |
| 660 | 660 | ||
| 661 | ResultCode KPageTable::UnmapPages(VAddr addr, KPageLinkedList& page_linked_list, | 661 | ResultCode KPageTable::UnmapPages(VAddr addr, KPageLinkedList& page_linked_list, |
| @@ -677,7 +677,7 @@ ResultCode KPageTable::UnmapPages(VAddr addr, KPageLinkedList& page_linked_list, | |||
| 677 | 677 | ||
| 678 | block_manager->Update(addr, num_pages, state, KMemoryPermission::None); | 678 | block_manager->Update(addr, num_pages, state, KMemoryPermission::None); |
| 679 | 679 | ||
| 680 | return RESULT_SUCCESS; | 680 | return ResultSuccess; |
| 681 | } | 681 | } |
| 682 | 682 | ||
| 683 | ResultCode KPageTable::SetCodeMemoryPermission(VAddr addr, std::size_t size, | 683 | ResultCode KPageTable::SetCodeMemoryPermission(VAddr addr, std::size_t size, |
| @@ -708,7 +708,7 @@ ResultCode KPageTable::SetCodeMemoryPermission(VAddr addr, std::size_t size, | |||
| 708 | 708 | ||
| 709 | // Return early if there is nothing to change | 709 | // Return early if there is nothing to change |
| 710 | if (state == prev_state && perm == prev_perm) { | 710 | if (state == prev_state && perm == prev_perm) { |
| 711 | return RESULT_SUCCESS; | 711 | return ResultSuccess; |
| 712 | } | 712 | } |
| 713 | 713 | ||
| 714 | if ((prev_perm & KMemoryPermission::Execute) != (perm & KMemoryPermission::Execute)) { | 714 | if ((prev_perm & KMemoryPermission::Execute) != (perm & KMemoryPermission::Execute)) { |
| @@ -725,7 +725,7 @@ ResultCode KPageTable::SetCodeMemoryPermission(VAddr addr, std::size_t size, | |||
| 725 | 725 | ||
| 726 | block_manager->Update(addr, num_pages, state, perm); | 726 | block_manager->Update(addr, num_pages, state, perm); |
| 727 | 727 | ||
| 728 | return RESULT_SUCCESS; | 728 | return ResultSuccess; |
| 729 | } | 729 | } |
| 730 | 730 | ||
| 731 | KMemoryInfo KPageTable::QueryInfoImpl(VAddr addr) { | 731 | KMemoryInfo KPageTable::QueryInfoImpl(VAddr addr) { |
| @@ -758,7 +758,7 @@ ResultCode KPageTable::ReserveTransferMemory(VAddr addr, std::size_t size, KMemo | |||
| 758 | 758 | ||
| 759 | block_manager->Update(addr, size / PageSize, state, perm, attribute | KMemoryAttribute::Locked); | 759 | block_manager->Update(addr, size / PageSize, state, perm, attribute | KMemoryAttribute::Locked); |
| 760 | 760 | ||
| 761 | return RESULT_SUCCESS; | 761 | return ResultSuccess; |
| 762 | } | 762 | } |
| 763 | 763 | ||
| 764 | ResultCode KPageTable::ResetTransferMemory(VAddr addr, std::size_t size) { | 764 | ResultCode KPageTable::ResetTransferMemory(VAddr addr, std::size_t size) { |
| @@ -775,7 +775,7 @@ ResultCode KPageTable::ResetTransferMemory(VAddr addr, std::size_t size) { | |||
| 775 | 775 | ||
| 776 | block_manager->Update(addr, size / PageSize, state, KMemoryPermission::ReadAndWrite); | 776 | block_manager->Update(addr, size / PageSize, state, KMemoryPermission::ReadAndWrite); |
| 777 | 777 | ||
| 778 | return RESULT_SUCCESS; | 778 | return ResultSuccess; |
| 779 | } | 779 | } |
| 780 | 780 | ||
| 781 | ResultCode KPageTable::SetMemoryAttribute(VAddr addr, std::size_t size, KMemoryAttribute mask, | 781 | ResultCode KPageTable::SetMemoryAttribute(VAddr addr, std::size_t size, KMemoryAttribute mask, |
| @@ -797,13 +797,13 @@ ResultCode KPageTable::SetMemoryAttribute(VAddr addr, std::size_t size, KMemoryA | |||
| 797 | 797 | ||
| 798 | block_manager->Update(addr, size / PageSize, state, perm, attribute); | 798 | block_manager->Update(addr, size / PageSize, state, perm, attribute); |
| 799 | 799 | ||
| 800 | return RESULT_SUCCESS; | 800 | return ResultSuccess; |
| 801 | } | 801 | } |
| 802 | 802 | ||
| 803 | ResultCode KPageTable::SetHeapCapacity(std::size_t new_heap_capacity) { | 803 | ResultCode KPageTable::SetHeapCapacity(std::size_t new_heap_capacity) { |
| 804 | std::lock_guard lock{page_table_lock}; | 804 | std::lock_guard lock{page_table_lock}; |
| 805 | heap_capacity = new_heap_capacity; | 805 | heap_capacity = new_heap_capacity; |
| 806 | return RESULT_SUCCESS; | 806 | return ResultSuccess; |
| 807 | } | 807 | } |
| 808 | 808 | ||
| 809 | ResultVal<VAddr> KPageTable::SetHeapSize(std::size_t size) { | 809 | ResultVal<VAddr> KPageTable::SetHeapSize(std::size_t size) { |
| @@ -911,7 +911,7 @@ ResultCode KPageTable::LockForDeviceAddressSpace(VAddr addr, std::size_t size) { | |||
| 911 | }, | 911 | }, |
| 912 | perm); | 912 | perm); |
| 913 | 913 | ||
| 914 | return RESULT_SUCCESS; | 914 | return ResultSuccess; |
| 915 | } | 915 | } |
| 916 | 916 | ||
| 917 | ResultCode KPageTable::UnlockForDeviceAddressSpace(VAddr addr, std::size_t size) { | 917 | ResultCode KPageTable::UnlockForDeviceAddressSpace(VAddr addr, std::size_t size) { |
| @@ -934,13 +934,13 @@ ResultCode KPageTable::UnlockForDeviceAddressSpace(VAddr addr, std::size_t size) | |||
| 934 | }, | 934 | }, |
| 935 | perm); | 935 | perm); |
| 936 | 936 | ||
| 937 | return RESULT_SUCCESS; | 937 | return ResultSuccess; |
| 938 | } | 938 | } |
| 939 | 939 | ||
| 940 | ResultCode KPageTable::InitializeMemoryLayout(VAddr start, VAddr end) { | 940 | ResultCode KPageTable::InitializeMemoryLayout(VAddr start, VAddr end) { |
| 941 | block_manager = std::make_unique<KMemoryBlockManager>(start, end); | 941 | block_manager = std::make_unique<KMemoryBlockManager>(start, end); |
| 942 | 942 | ||
| 943 | return RESULT_SUCCESS; | 943 | return ResultSuccess; |
| 944 | } | 944 | } |
| 945 | 945 | ||
| 946 | bool KPageTable::IsRegionMapped(VAddr address, u64 size) { | 946 | bool KPageTable::IsRegionMapped(VAddr address, u64 size) { |
| @@ -1006,7 +1006,7 @@ ResultCode KPageTable::Operate(VAddr addr, std::size_t num_pages, const KPageLin | |||
| 1006 | addr += size; | 1006 | addr += size; |
| 1007 | } | 1007 | } |
| 1008 | 1008 | ||
| 1009 | return RESULT_SUCCESS; | 1009 | return ResultSuccess; |
| 1010 | } | 1010 | } |
| 1011 | 1011 | ||
| 1012 | ResultCode KPageTable::Operate(VAddr addr, std::size_t num_pages, KMemoryPermission perm, | 1012 | ResultCode KPageTable::Operate(VAddr addr, std::size_t num_pages, KMemoryPermission perm, |
| @@ -1033,7 +1033,7 @@ ResultCode KPageTable::Operate(VAddr addr, std::size_t num_pages, KMemoryPermiss | |||
| 1033 | default: | 1033 | default: |
| 1034 | UNREACHABLE(); | 1034 | UNREACHABLE(); |
| 1035 | } | 1035 | } |
| 1036 | return RESULT_SUCCESS; | 1036 | return ResultSuccess; |
| 1037 | } | 1037 | } |
| 1038 | 1038 | ||
| 1039 | constexpr VAddr KPageTable::GetRegionAddress(KMemoryState state) const { | 1039 | constexpr VAddr KPageTable::GetRegionAddress(KMemoryState state) const { |
| @@ -1164,7 +1164,7 @@ constexpr ResultCode KPageTable::CheckMemoryState(const KMemoryInfo& info, KMemo | |||
| 1164 | return ResultInvalidCurrentMemory; | 1164 | return ResultInvalidCurrentMemory; |
| 1165 | } | 1165 | } |
| 1166 | 1166 | ||
| 1167 | return RESULT_SUCCESS; | 1167 | return ResultSuccess; |
| 1168 | } | 1168 | } |
| 1169 | 1169 | ||
| 1170 | ResultCode KPageTable::CheckMemoryState(KMemoryState* out_state, KMemoryPermission* out_perm, | 1170 | ResultCode KPageTable::CheckMemoryState(KMemoryState* out_state, KMemoryPermission* out_perm, |
| @@ -1223,7 +1223,7 @@ ResultCode KPageTable::CheckMemoryState(KMemoryState* out_state, KMemoryPermissi | |||
| 1223 | *out_attr = first_attr & static_cast<KMemoryAttribute>(~ignore_attr); | 1223 | *out_attr = first_attr & static_cast<KMemoryAttribute>(~ignore_attr); |
| 1224 | } | 1224 | } |
| 1225 | 1225 | ||
| 1226 | return RESULT_SUCCESS; | 1226 | return ResultSuccess; |
| 1227 | } | 1227 | } |
| 1228 | 1228 | ||
| 1229 | } // namespace Kernel | 1229 | } // namespace Kernel |
diff --git a/src/core/hle/kernel/k_port.cpp b/src/core/hle/kernel/k_port.cpp index 223c0b205..a8ba09c4a 100644 --- a/src/core/hle/kernel/k_port.cpp +++ b/src/core/hle/kernel/k_port.cpp | |||
| @@ -59,7 +59,7 @@ ResultCode KPort::EnqueueSession(KServerSession* session) { | |||
| 59 | server.EnqueueSession(session); | 59 | server.EnqueueSession(session); |
| 60 | server.GetSessionRequestHandler()->ClientConnected(server.AcceptSession()); | 60 | server.GetSessionRequestHandler()->ClientConnected(server.AcceptSession()); |
| 61 | 61 | ||
| 62 | return RESULT_SUCCESS; | 62 | return ResultSuccess; |
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | } // namespace Kernel | 65 | } // namespace Kernel |
diff --git a/src/core/hle/kernel/k_process.cpp b/src/core/hle/kernel/k_process.cpp index bdcbaeeaa..06b8ce151 100644 --- a/src/core/hle/kernel/k_process.cpp +++ b/src/core/hle/kernel/k_process.cpp | |||
| @@ -142,7 +142,7 @@ ResultCode KProcess::Initialize(KProcess* process, Core::System& system, std::st | |||
| 142 | // Open a reference to the resource limit. | 142 | // Open a reference to the resource limit. |
| 143 | process->resource_limit->Open(); | 143 | process->resource_limit->Open(); |
| 144 | 144 | ||
| 145 | return RESULT_SUCCESS; | 145 | return ResultSuccess; |
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | KResourceLimit* KProcess::GetResourceLimit() const { | 148 | KResourceLimit* KProcess::GetResourceLimit() const { |
| @@ -258,7 +258,7 @@ ResultCode KProcess::AddSharedMemory(KSharedMemory* shmem, [[maybe_unused]] VAdd | |||
| 258 | // Open a reference to the shared memory. | 258 | // Open a reference to the shared memory. |
| 259 | shmem->Open(); | 259 | shmem->Open(); |
| 260 | 260 | ||
| 261 | return RESULT_SUCCESS; | 261 | return ResultSuccess; |
| 262 | } | 262 | } |
| 263 | 263 | ||
| 264 | void KProcess::RemoveSharedMemory(KSharedMemory* shmem, [[maybe_unused]] VAddr address, | 264 | void KProcess::RemoveSharedMemory(KSharedMemory* shmem, [[maybe_unused]] VAddr address, |
| @@ -291,7 +291,7 @@ ResultCode KProcess::Reset() { | |||
| 291 | 291 | ||
| 292 | // Clear signaled. | 292 | // Clear signaled. |
| 293 | is_signaled = false; | 293 | is_signaled = false; |
| 294 | return RESULT_SUCCESS; | 294 | return ResultSuccess; |
| 295 | } | 295 | } |
| 296 | 296 | ||
| 297 | ResultCode KProcess::LoadFromMetadata(const FileSys::ProgramMetadata& metadata, | 297 | ResultCode KProcess::LoadFromMetadata(const FileSys::ProgramMetadata& metadata, |
| @@ -524,7 +524,7 @@ ResultCode KProcess::AllocateMainThreadStack(std::size_t stack_size) { | |||
| 524 | 524 | ||
| 525 | main_thread_stack_top += main_thread_stack_size; | 525 | main_thread_stack_top += main_thread_stack_size; |
| 526 | 526 | ||
| 527 | return RESULT_SUCCESS; | 527 | return ResultSuccess; |
| 528 | } | 528 | } |
| 529 | 529 | ||
| 530 | } // namespace Kernel | 530 | } // namespace Kernel |
diff --git a/src/core/hle/kernel/k_process.h b/src/core/hle/kernel/k_process.h index c0656b9af..a03c074fb 100644 --- a/src/core/hle/kernel/k_process.h +++ b/src/core/hle/kernel/k_process.h | |||
| @@ -310,7 +310,7 @@ public: | |||
| 310 | * | 310 | * |
| 311 | * @param metadata The provided metadata to load process specific info from. | 311 | * @param metadata The provided metadata to load process specific info from. |
| 312 | * | 312 | * |
| 313 | * @returns RESULT_SUCCESS if all relevant metadata was able to be | 313 | * @returns ResultSuccess if all relevant metadata was able to be |
| 314 | * loaded and parsed. Otherwise, an error code is returned. | 314 | * loaded and parsed. Otherwise, an error code is returned. |
| 315 | */ | 315 | */ |
| 316 | ResultCode LoadFromMetadata(const FileSys::ProgramMetadata& metadata, std::size_t code_size); | 316 | ResultCode LoadFromMetadata(const FileSys::ProgramMetadata& metadata, std::size_t code_size); |
diff --git a/src/core/hle/kernel/k_readable_event.cpp b/src/core/hle/kernel/k_readable_event.cpp index 0ea2d0275..bf1db10d4 100644 --- a/src/core/hle/kernel/k_readable_event.cpp +++ b/src/core/hle/kernel/k_readable_event.cpp | |||
| @@ -36,13 +36,13 @@ ResultCode KReadableEvent::Signal() { | |||
| 36 | NotifyAvailable(); | 36 | NotifyAvailable(); |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | return RESULT_SUCCESS; | 39 | return ResultSuccess; |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | ResultCode KReadableEvent::Clear() { | 42 | ResultCode KReadableEvent::Clear() { |
| 43 | Reset(); | 43 | Reset(); |
| 44 | 44 | ||
| 45 | return RESULT_SUCCESS; | 45 | return ResultSuccess; |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | ResultCode KReadableEvent::Reset() { | 48 | ResultCode KReadableEvent::Reset() { |
| @@ -53,7 +53,7 @@ ResultCode KReadableEvent::Reset() { | |||
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | is_signaled = false; | 55 | is_signaled = false; |
| 56 | return RESULT_SUCCESS; | 56 | return ResultSuccess; |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | } // namespace Kernel | 59 | } // namespace Kernel |
diff --git a/src/core/hle/kernel/k_resource_limit.cpp b/src/core/hle/kernel/k_resource_limit.cpp index bf20bf7d0..f91cb65dc 100644 --- a/src/core/hle/kernel/k_resource_limit.cpp +++ b/src/core/hle/kernel/k_resource_limit.cpp | |||
| @@ -80,7 +80,7 @@ ResultCode KResourceLimit::SetLimitValue(LimitableResource which, s64 value) { | |||
| 80 | 80 | ||
| 81 | limit_values[index] = value; | 81 | limit_values[index] = value; |
| 82 | 82 | ||
| 83 | return RESULT_SUCCESS; | 83 | return ResultSuccess; |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | bool KResourceLimit::Reserve(LimitableResource which, s64 value) { | 86 | bool KResourceLimit::Reserve(LimitableResource which, s64 value) { |
diff --git a/src/core/hle/kernel/k_server_session.cpp b/src/core/hle/kernel/k_server_session.cpp index 457fdfd60..dbf03b462 100644 --- a/src/core/hle/kernel/k_server_session.cpp +++ b/src/core/hle/kernel/k_server_session.cpp | |||
| @@ -71,7 +71,7 @@ std::size_t KServerSession::NumDomainRequestHandlers() const { | |||
| 71 | 71 | ||
| 72 | ResultCode KServerSession::HandleDomainSyncRequest(Kernel::HLERequestContext& context) { | 72 | ResultCode KServerSession::HandleDomainSyncRequest(Kernel::HLERequestContext& context) { |
| 73 | if (!context.HasDomainMessageHeader()) { | 73 | if (!context.HasDomainMessageHeader()) { |
| 74 | return RESULT_SUCCESS; | 74 | return ResultSuccess; |
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | // Set domain handlers in HLE context, used for domain objects (IPC interfaces) as inputs | 77 | // Set domain handlers in HLE context, used for domain objects (IPC interfaces) as inputs |
| @@ -88,7 +88,7 @@ ResultCode KServerSession::HandleDomainSyncRequest(Kernel::HLERequestContext& co | |||
| 88 | "to {} needed to return a new interface!", | 88 | "to {} needed to return a new interface!", |
| 89 | object_id, name); | 89 | object_id, name); |
| 90 | UNREACHABLE(); | 90 | UNREACHABLE(); |
| 91 | return RESULT_SUCCESS; // Ignore error if asserts are off | 91 | return ResultSuccess; // Ignore error if asserts are off |
| 92 | } | 92 | } |
| 93 | return manager->DomainHandler(object_id - 1)->HandleSyncRequest(*this, context); | 93 | return manager->DomainHandler(object_id - 1)->HandleSyncRequest(*this, context); |
| 94 | 94 | ||
| @@ -98,14 +98,14 @@ ResultCode KServerSession::HandleDomainSyncRequest(Kernel::HLERequestContext& co | |||
| 98 | manager->CloseDomainHandler(object_id - 1); | 98 | manager->CloseDomainHandler(object_id - 1); |
| 99 | 99 | ||
| 100 | IPC::ResponseBuilder rb{context, 2}; | 100 | IPC::ResponseBuilder rb{context, 2}; |
| 101 | rb.Push(RESULT_SUCCESS); | 101 | rb.Push(ResultSuccess); |
| 102 | return RESULT_SUCCESS; | 102 | return ResultSuccess; |
| 103 | } | 103 | } |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | LOG_CRITICAL(IPC, "Unknown domain command={}", domain_message_header.command.Value()); | 106 | LOG_CRITICAL(IPC, "Unknown domain command={}", domain_message_header.command.Value()); |
| 107 | ASSERT(false); | 107 | ASSERT(false); |
| 108 | return RESULT_SUCCESS; | 108 | return ResultSuccess; |
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | ResultCode KServerSession::QueueSyncRequest(KThread* thread, Core::Memory::Memory& memory) { | 111 | ResultCode KServerSession::QueueSyncRequest(KThread* thread, Core::Memory::Memory& memory) { |
| @@ -116,14 +116,14 @@ ResultCode KServerSession::QueueSyncRequest(KThread* thread, Core::Memory::Memor | |||
| 116 | 116 | ||
| 117 | if (auto strong_ptr = service_thread.lock()) { | 117 | if (auto strong_ptr = service_thread.lock()) { |
| 118 | strong_ptr->QueueSyncRequest(*parent, std::move(context)); | 118 | strong_ptr->QueueSyncRequest(*parent, std::move(context)); |
| 119 | return RESULT_SUCCESS; | 119 | return ResultSuccess; |
| 120 | } | 120 | } |
| 121 | 121 | ||
| 122 | return RESULT_SUCCESS; | 122 | return ResultSuccess; |
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | ResultCode KServerSession::CompleteSyncRequest(HLERequestContext& context) { | 125 | ResultCode KServerSession::CompleteSyncRequest(HLERequestContext& context) { |
| 126 | ResultCode result = RESULT_SUCCESS; | 126 | ResultCode result = ResultSuccess; |
| 127 | // If the session has been converted to a domain, handle the domain request | 127 | // If the session has been converted to a domain, handle the domain request |
| 128 | if (IsDomain() && context.HasDomainMessageHeader()) { | 128 | if (IsDomain() && context.HasDomainMessageHeader()) { |
| 129 | result = HandleDomainSyncRequest(context); | 129 | result = HandleDomainSyncRequest(context); |
diff --git a/src/core/hle/kernel/k_shared_memory.cpp b/src/core/hle/kernel/k_shared_memory.cpp index 7770b1868..51d7538ca 100644 --- a/src/core/hle/kernel/k_shared_memory.cpp +++ b/src/core/hle/kernel/k_shared_memory.cpp | |||
| @@ -55,7 +55,7 @@ ResultCode KSharedMemory::Initialize(Core::DeviceMemory& device_memory_, KProces | |||
| 55 | // Clear all pages in the memory. | 55 | // Clear all pages in the memory. |
| 56 | std::memset(device_memory_.GetPointer(physical_address_), 0, size_); | 56 | std::memset(device_memory_.GetPointer(physical_address_), 0, size_); |
| 57 | 57 | ||
| 58 | return RESULT_SUCCESS; | 58 | return ResultSuccess; |
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | void KSharedMemory::Finalize() { | 61 | void KSharedMemory::Finalize() { |
diff --git a/src/core/hle/kernel/k_synchronization_object.cpp b/src/core/hle/kernel/k_synchronization_object.cpp index 45380dea0..f168b4f21 100644 --- a/src/core/hle/kernel/k_synchronization_object.cpp +++ b/src/core/hle/kernel/k_synchronization_object.cpp | |||
| @@ -38,7 +38,7 @@ ResultCode KSynchronizationObject::Wait(KernelCore& kernel_ctx, s32* out_index, | |||
| 38 | if (objects[i]->IsSignaled()) { | 38 | if (objects[i]->IsSignaled()) { |
| 39 | *out_index = i; | 39 | *out_index = i; |
| 40 | slp.CancelSleep(); | 40 | slp.CancelSleep(); |
| 41 | return RESULT_SUCCESS; | 41 | return ResultSuccess; |
| 42 | } | 42 | } |
| 43 | } | 43 | } |
| 44 | 44 | ||
| @@ -97,7 +97,7 @@ ResultCode KSynchronizationObject::Wait(KernelCore& kernel_ctx, s32* out_index, | |||
| 97 | kernel_ctx.TimeManager().UnscheduleTimeEvent(thread); | 97 | kernel_ctx.TimeManager().UnscheduleTimeEvent(thread); |
| 98 | 98 | ||
| 99 | // Get the wait result. | 99 | // Get the wait result. |
| 100 | ResultCode wait_result{RESULT_SUCCESS}; | 100 | ResultCode wait_result{ResultSuccess}; |
| 101 | s32 sync_index = -1; | 101 | s32 sync_index = -1; |
| 102 | { | 102 | { |
| 103 | KScopedSchedulerLock lock(kernel_ctx); | 103 | KScopedSchedulerLock lock(kernel_ctx); |
diff --git a/src/core/hle/kernel/k_synchronization_object.h b/src/core/hle/kernel/k_synchronization_object.h index 3d4ce1fbc..898e58e16 100644 --- a/src/core/hle/kernel/k_synchronization_object.h +++ b/src/core/hle/kernel/k_synchronization_object.h | |||
| @@ -43,7 +43,7 @@ protected: | |||
| 43 | 43 | ||
| 44 | void NotifyAvailable(ResultCode result); | 44 | void NotifyAvailable(ResultCode result); |
| 45 | void NotifyAvailable() { | 45 | void NotifyAvailable() { |
| 46 | return this->NotifyAvailable(RESULT_SUCCESS); | 46 | return this->NotifyAvailable(ResultSuccess); |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | private: | 49 | private: |
diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp index 3cf43d290..9f1d3156b 100644 --- a/src/core/hle/kernel/k_thread.cpp +++ b/src/core/hle/kernel/k_thread.cpp | |||
| @@ -205,7 +205,7 @@ ResultCode KThread::Initialize(KThreadFunction func, uintptr_t arg, VAddr user_s | |||
| 205 | } | 205 | } |
| 206 | } | 206 | } |
| 207 | 207 | ||
| 208 | return RESULT_SUCCESS; | 208 | return ResultSuccess; |
| 209 | } | 209 | } |
| 210 | 210 | ||
| 211 | ResultCode KThread::InitializeThread(KThread* thread, KThreadFunction func, uintptr_t arg, | 211 | ResultCode KThread::InitializeThread(KThread* thread, KThreadFunction func, uintptr_t arg, |
| @@ -219,7 +219,7 @@ ResultCode KThread::InitializeThread(KThread* thread, KThreadFunction func, uint | |||
| 219 | thread->host_context = | 219 | thread->host_context = |
| 220 | std::make_shared<Common::Fiber>(std::move(init_func), init_func_parameter); | 220 | std::make_shared<Common::Fiber>(std::move(init_func), init_func_parameter); |
| 221 | 221 | ||
| 222 | return RESULT_SUCCESS; | 222 | return ResultSuccess; |
| 223 | } | 223 | } |
| 224 | 224 | ||
| 225 | ResultCode KThread::InitializeDummyThread(KThread* thread) { | 225 | ResultCode KThread::InitializeDummyThread(KThread* thread) { |
| @@ -460,7 +460,7 @@ ResultCode KThread::GetCoreMask(s32* out_ideal_core, u64* out_affinity_mask) { | |||
| 460 | *out_ideal_core = virtual_ideal_core_id; | 460 | *out_ideal_core = virtual_ideal_core_id; |
| 461 | *out_affinity_mask = virtual_affinity_mask; | 461 | *out_affinity_mask = virtual_affinity_mask; |
| 462 | 462 | ||
| 463 | return RESULT_SUCCESS; | 463 | return ResultSuccess; |
| 464 | } | 464 | } |
| 465 | 465 | ||
| 466 | ResultCode KThread::GetPhysicalCoreMask(s32* out_ideal_core, u64* out_affinity_mask) { | 466 | ResultCode KThread::GetPhysicalCoreMask(s32* out_ideal_core, u64* out_affinity_mask) { |
| @@ -476,7 +476,7 @@ ResultCode KThread::GetPhysicalCoreMask(s32* out_ideal_core, u64* out_affinity_m | |||
| 476 | *out_affinity_mask = original_physical_affinity_mask.GetAffinityMask(); | 476 | *out_affinity_mask = original_physical_affinity_mask.GetAffinityMask(); |
| 477 | } | 477 | } |
| 478 | 478 | ||
| 479 | return RESULT_SUCCESS; | 479 | return ResultSuccess; |
| 480 | } | 480 | } |
| 481 | 481 | ||
| 482 | ResultCode KThread::SetCoreMask(s32 cpu_core_id, u64 v_affinity_mask) { | 482 | ResultCode KThread::SetCoreMask(s32 cpu_core_id, u64 v_affinity_mask) { |
| @@ -599,7 +599,7 @@ ResultCode KThread::SetCoreMask(s32 cpu_core_id, u64 v_affinity_mask) { | |||
| 599 | } | 599 | } |
| 600 | } | 600 | } |
| 601 | 601 | ||
| 602 | return RESULT_SUCCESS; | 602 | return ResultSuccess; |
| 603 | } | 603 | } |
| 604 | 604 | ||
| 605 | void KThread::SetBasePriority(s32 value) { | 605 | void KThread::SetBasePriority(s32 value) { |
| @@ -778,7 +778,7 @@ ResultCode KThread::SetActivity(Svc::ThreadActivity activity) { | |||
| 778 | } | 778 | } |
| 779 | } | 779 | } |
| 780 | 780 | ||
| 781 | return RESULT_SUCCESS; | 781 | return ResultSuccess; |
| 782 | } | 782 | } |
| 783 | 783 | ||
| 784 | ResultCode KThread::GetThreadContext3(std::vector<u8>& out) { | 784 | ResultCode KThread::GetThreadContext3(std::vector<u8>& out) { |
| @@ -813,7 +813,7 @@ ResultCode KThread::GetThreadContext3(std::vector<u8>& out) { | |||
| 813 | } | 813 | } |
| 814 | } | 814 | } |
| 815 | 815 | ||
| 816 | return RESULT_SUCCESS; | 816 | return ResultSuccess; |
| 817 | } | 817 | } |
| 818 | 818 | ||
| 819 | void KThread::AddWaiterImpl(KThread* thread) { | 819 | void KThread::AddWaiterImpl(KThread* thread) { |
| @@ -970,7 +970,7 @@ ResultCode KThread::Run() { | |||
| 970 | 970 | ||
| 971 | // Set our state and finish. | 971 | // Set our state and finish. |
| 972 | SetState(ThreadState::Runnable); | 972 | SetState(ThreadState::Runnable); |
| 973 | return RESULT_SUCCESS; | 973 | return ResultSuccess; |
| 974 | } | 974 | } |
| 975 | } | 975 | } |
| 976 | 976 | ||
| @@ -1020,7 +1020,7 @@ ResultCode KThread::Sleep(s64 timeout) { | |||
| 1020 | // Cancel the timer. | 1020 | // Cancel the timer. |
| 1021 | kernel.TimeManager().UnscheduleTimeEvent(this); | 1021 | kernel.TimeManager().UnscheduleTimeEvent(this); |
| 1022 | 1022 | ||
| 1023 | return RESULT_SUCCESS; | 1023 | return ResultSuccess; |
| 1024 | } | 1024 | } |
| 1025 | 1025 | ||
| 1026 | void KThread::SetState(ThreadState state) { | 1026 | void KThread::SetState(ThreadState state) { |
diff --git a/src/core/hle/kernel/k_thread.h b/src/core/hle/kernel/k_thread.h index 01eebb165..c77f44ad4 100644 --- a/src/core/hle/kernel/k_thread.h +++ b/src/core/hle/kernel/k_thread.h | |||
| @@ -684,7 +684,7 @@ private: | |||
| 684 | u32 address_key_value{}; | 684 | u32 address_key_value{}; |
| 685 | u32 suspend_request_flags{}; | 685 | u32 suspend_request_flags{}; |
| 686 | u32 suspend_allowed_flags{}; | 686 | u32 suspend_allowed_flags{}; |
| 687 | ResultCode wait_result{RESULT_SUCCESS}; | 687 | ResultCode wait_result{ResultSuccess}; |
| 688 | s32 base_priority{}; | 688 | s32 base_priority{}; |
| 689 | s32 physical_ideal_core_id{}; | 689 | s32 physical_ideal_core_id{}; |
| 690 | s32 virtual_ideal_core_id{}; | 690 | s32 virtual_ideal_core_id{}; |
diff --git a/src/core/hle/kernel/k_transfer_memory.cpp b/src/core/hle/kernel/k_transfer_memory.cpp index 5bc33706d..1732925c9 100644 --- a/src/core/hle/kernel/k_transfer_memory.cpp +++ b/src/core/hle/kernel/k_transfer_memory.cpp | |||
| @@ -28,7 +28,7 @@ ResultCode KTransferMemory::Initialize(VAddr address_, std::size_t size_, | |||
| 28 | size = size_; | 28 | size = size_; |
| 29 | is_initialized = true; | 29 | is_initialized = true; |
| 30 | 30 | ||
| 31 | return RESULT_SUCCESS; | 31 | return ResultSuccess; |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | void KTransferMemory::Finalize() { | 34 | void KTransferMemory::Finalize() { |
diff --git a/src/core/hle/kernel/process_capability.cpp b/src/core/hle/kernel/process_capability.cpp index b2ceeceb3..31a0867d3 100644 --- a/src/core/hle/kernel/process_capability.cpp +++ b/src/core/hle/kernel/process_capability.cpp | |||
| @@ -153,7 +153,7 @@ ResultCode ProcessCapabilities::ParseCapabilities(const u32* capabilities, | |||
| 153 | } | 153 | } |
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | return RESULT_SUCCESS; | 156 | return ResultSuccess; |
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | ResultCode ProcessCapabilities::ParseSingleFlagCapability(u32& set_flags, u32& set_svc_bits, | 159 | ResultCode ProcessCapabilities::ParseSingleFlagCapability(u32& set_flags, u32& set_svc_bits, |
| @@ -167,7 +167,7 @@ ResultCode ProcessCapabilities::ParseSingleFlagCapability(u32& set_flags, u32& s | |||
| 167 | // Bail early on ignorable entries, as one would expect, | 167 | // Bail early on ignorable entries, as one would expect, |
| 168 | // ignorable descriptors can be ignored. | 168 | // ignorable descriptors can be ignored. |
| 169 | if (type == CapabilityType::Ignorable) { | 169 | if (type == CapabilityType::Ignorable) { |
| 170 | return RESULT_SUCCESS; | 170 | return ResultSuccess; |
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | // Ensure that the give flag hasn't already been initialized before. | 173 | // Ensure that the give flag hasn't already been initialized before. |
| @@ -264,7 +264,7 @@ ResultCode ProcessCapabilities::HandlePriorityCoreNumFlags(u32 flags) { | |||
| 264 | 264 | ||
| 265 | core_mask = make_mask(core_num_min, core_num_max); | 265 | core_mask = make_mask(core_num_min, core_num_max); |
| 266 | priority_mask = make_mask(priority_min, priority_max); | 266 | priority_mask = make_mask(priority_min, priority_max); |
| 267 | return RESULT_SUCCESS; | 267 | return ResultSuccess; |
| 268 | } | 268 | } |
| 269 | 269 | ||
| 270 | ResultCode ProcessCapabilities::HandleSyscallFlags(u32& set_svc_bits, u32 flags) { | 270 | ResultCode ProcessCapabilities::HandleSyscallFlags(u32& set_svc_bits, u32 flags) { |
| @@ -288,23 +288,23 @@ ResultCode ProcessCapabilities::HandleSyscallFlags(u32& set_svc_bits, u32 flags) | |||
| 288 | svc_capabilities[svc_number] = true; | 288 | svc_capabilities[svc_number] = true; |
| 289 | } | 289 | } |
| 290 | 290 | ||
| 291 | return RESULT_SUCCESS; | 291 | return ResultSuccess; |
| 292 | } | 292 | } |
| 293 | 293 | ||
| 294 | ResultCode ProcessCapabilities::HandleMapPhysicalFlags(u32 flags, u32 size_flags, | 294 | ResultCode ProcessCapabilities::HandleMapPhysicalFlags(u32 flags, u32 size_flags, |
| 295 | KPageTable& page_table) { | 295 | KPageTable& page_table) { |
| 296 | // TODO(Lioncache): Implement once the memory manager can handle this. | 296 | // TODO(Lioncache): Implement once the memory manager can handle this. |
| 297 | return RESULT_SUCCESS; | 297 | return ResultSuccess; |
| 298 | } | 298 | } |
| 299 | 299 | ||
| 300 | ResultCode ProcessCapabilities::HandleMapIOFlags(u32 flags, KPageTable& page_table) { | 300 | ResultCode ProcessCapabilities::HandleMapIOFlags(u32 flags, KPageTable& page_table) { |
| 301 | // TODO(Lioncache): Implement once the memory manager can handle this. | 301 | // TODO(Lioncache): Implement once the memory manager can handle this. |
| 302 | return RESULT_SUCCESS; | 302 | return ResultSuccess; |
| 303 | } | 303 | } |
| 304 | 304 | ||
| 305 | ResultCode ProcessCapabilities::HandleMapRegionFlags(u32 flags, KPageTable& page_table) { | 305 | ResultCode ProcessCapabilities::HandleMapRegionFlags(u32 flags, KPageTable& page_table) { |
| 306 | // TODO(Lioncache): Implement once the memory manager can handle this. | 306 | // TODO(Lioncache): Implement once the memory manager can handle this. |
| 307 | return RESULT_SUCCESS; | 307 | return ResultSuccess; |
| 308 | } | 308 | } |
| 309 | 309 | ||
| 310 | ResultCode ProcessCapabilities::HandleInterruptFlags(u32 flags) { | 310 | ResultCode ProcessCapabilities::HandleInterruptFlags(u32 flags) { |
| @@ -331,7 +331,7 @@ ResultCode ProcessCapabilities::HandleInterruptFlags(u32 flags) { | |||
| 331 | interrupt_capabilities[interrupt] = true; | 331 | interrupt_capabilities[interrupt] = true; |
| 332 | } | 332 | } |
| 333 | 333 | ||
| 334 | return RESULT_SUCCESS; | 334 | return ResultSuccess; |
| 335 | } | 335 | } |
| 336 | 336 | ||
| 337 | ResultCode ProcessCapabilities::HandleProgramTypeFlags(u32 flags) { | 337 | ResultCode ProcessCapabilities::HandleProgramTypeFlags(u32 flags) { |
| @@ -342,7 +342,7 @@ ResultCode ProcessCapabilities::HandleProgramTypeFlags(u32 flags) { | |||
| 342 | } | 342 | } |
| 343 | 343 | ||
| 344 | program_type = static_cast<ProgramType>((flags >> 14) & 0b111); | 344 | program_type = static_cast<ProgramType>((flags >> 14) & 0b111); |
| 345 | return RESULT_SUCCESS; | 345 | return ResultSuccess; |
| 346 | } | 346 | } |
| 347 | 347 | ||
| 348 | ResultCode ProcessCapabilities::HandleKernelVersionFlags(u32 flags) { | 348 | ResultCode ProcessCapabilities::HandleKernelVersionFlags(u32 flags) { |
| @@ -362,7 +362,7 @@ ResultCode ProcessCapabilities::HandleKernelVersionFlags(u32 flags) { | |||
| 362 | } | 362 | } |
| 363 | 363 | ||
| 364 | kernel_version = flags; | 364 | kernel_version = flags; |
| 365 | return RESULT_SUCCESS; | 365 | return ResultSuccess; |
| 366 | } | 366 | } |
| 367 | 367 | ||
| 368 | ResultCode ProcessCapabilities::HandleHandleTableFlags(u32 flags) { | 368 | ResultCode ProcessCapabilities::HandleHandleTableFlags(u32 flags) { |
| @@ -373,7 +373,7 @@ ResultCode ProcessCapabilities::HandleHandleTableFlags(u32 flags) { | |||
| 373 | } | 373 | } |
| 374 | 374 | ||
| 375 | handle_table_size = static_cast<s32>((flags >> 16) & 0x3FF); | 375 | handle_table_size = static_cast<s32>((flags >> 16) & 0x3FF); |
| 376 | return RESULT_SUCCESS; | 376 | return ResultSuccess; |
| 377 | } | 377 | } |
| 378 | 378 | ||
| 379 | ResultCode ProcessCapabilities::HandleDebugFlags(u32 flags) { | 379 | ResultCode ProcessCapabilities::HandleDebugFlags(u32 flags) { |
| @@ -385,7 +385,7 @@ ResultCode ProcessCapabilities::HandleDebugFlags(u32 flags) { | |||
| 385 | 385 | ||
| 386 | is_debuggable = (flags & 0x20000) != 0; | 386 | is_debuggable = (flags & 0x20000) != 0; |
| 387 | can_force_debug = (flags & 0x40000) != 0; | 387 | can_force_debug = (flags & 0x40000) != 0; |
| 388 | return RESULT_SUCCESS; | 388 | return ResultSuccess; |
| 389 | } | 389 | } |
| 390 | 390 | ||
| 391 | } // namespace Kernel | 391 | } // namespace Kernel |
diff --git a/src/core/hle/kernel/process_capability.h b/src/core/hle/kernel/process_capability.h index 2a7bf5505..a9b44325b 100644 --- a/src/core/hle/kernel/process_capability.h +++ b/src/core/hle/kernel/process_capability.h | |||
| @@ -84,7 +84,7 @@ public: | |||
| 84 | /// @param page_table The memory manager to use for handling any mapping-related | 84 | /// @param page_table The memory manager to use for handling any mapping-related |
| 85 | /// operations (such as mapping IO memory, etc). | 85 | /// operations (such as mapping IO memory, etc). |
| 86 | /// | 86 | /// |
| 87 | /// @returns RESULT_SUCCESS if this capabilities instance was able to be initialized, | 87 | /// @returns ResultSuccess if this capabilities instance was able to be initialized, |
| 88 | /// otherwise, an error code upon failure. | 88 | /// otherwise, an error code upon failure. |
| 89 | /// | 89 | /// |
| 90 | ResultCode InitializeForKernelProcess(const u32* capabilities, std::size_t num_capabilities, | 90 | ResultCode InitializeForKernelProcess(const u32* capabilities, std::size_t num_capabilities, |
| @@ -97,7 +97,7 @@ public: | |||
| 97 | /// @param page_table The memory manager to use for handling any mapping-related | 97 | /// @param page_table The memory manager to use for handling any mapping-related |
| 98 | /// operations (such as mapping IO memory, etc). | 98 | /// operations (such as mapping IO memory, etc). |
| 99 | /// | 99 | /// |
| 100 | /// @returns RESULT_SUCCESS if this capabilities instance was able to be initialized, | 100 | /// @returns ResultSuccess if this capabilities instance was able to be initialized, |
| 101 | /// otherwise, an error code upon failure. | 101 | /// otherwise, an error code upon failure. |
| 102 | /// | 102 | /// |
| 103 | ResultCode InitializeForUserProcess(const u32* capabilities, std::size_t num_capabilities, | 103 | ResultCode InitializeForUserProcess(const u32* capabilities, std::size_t num_capabilities, |
| @@ -184,7 +184,7 @@ private: | |||
| 184 | /// @param page_table The memory manager that will perform any memory | 184 | /// @param page_table The memory manager that will perform any memory |
| 185 | /// mapping if necessary. | 185 | /// mapping if necessary. |
| 186 | /// | 186 | /// |
| 187 | /// @return RESULT_SUCCESS if no errors occur, otherwise an error code. | 187 | /// @return ResultSuccess if no errors occur, otherwise an error code. |
| 188 | /// | 188 | /// |
| 189 | ResultCode ParseCapabilities(const u32* capabilities, std::size_t num_capabilities, | 189 | ResultCode ParseCapabilities(const u32* capabilities, std::size_t num_capabilities, |
| 190 | KPageTable& page_table); | 190 | KPageTable& page_table); |
| @@ -199,7 +199,7 @@ private: | |||
| 199 | /// @param page_table The memory manager that will perform any memory | 199 | /// @param page_table The memory manager that will perform any memory |
| 200 | /// mapping if necessary. | 200 | /// mapping if necessary. |
| 201 | /// | 201 | /// |
| 202 | /// @return RESULT_SUCCESS if no errors occurred, otherwise an error code. | 202 | /// @return ResultSuccess if no errors occurred, otherwise an error code. |
| 203 | /// | 203 | /// |
| 204 | ResultCode ParseSingleFlagCapability(u32& set_flags, u32& set_svc_bits, u32 flag, | 204 | ResultCode ParseSingleFlagCapability(u32& set_flags, u32& set_svc_bits, u32 flag, |
| 205 | KPageTable& page_table); | 205 | KPageTable& page_table); |
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 81e23f700..28bcae6e7 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp | |||
| @@ -132,7 +132,7 @@ ResultCode MapUnmapMemorySanityChecks(const KPageTable& manager, VAddr dst_addr, | |||
| 132 | return ResultInvalidMemoryRegion; | 132 | return ResultInvalidMemoryRegion; |
| 133 | } | 133 | } |
| 134 | 134 | ||
| 135 | return RESULT_SUCCESS; | 135 | return ResultSuccess; |
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | enum class ResourceLimitValueType { | 138 | enum class ResourceLimitValueType { |
| @@ -164,7 +164,7 @@ static ResultCode SetHeapSize(Core::System& system, VAddr* heap_addr, u64 heap_s | |||
| 164 | 164 | ||
| 165 | CASCADE_RESULT(*heap_addr, page_table.SetHeapSize(heap_size)); | 165 | CASCADE_RESULT(*heap_addr, page_table.SetHeapSize(heap_size)); |
| 166 | 166 | ||
| 167 | return RESULT_SUCCESS; | 167 | return ResultSuccess; |
| 168 | } | 168 | } |
| 169 | 169 | ||
| 170 | static ResultCode SetHeapSize32(Core::System& system, u32* heap_addr, u32 heap_size) { | 170 | static ResultCode SetHeapSize32(Core::System& system, u32* heap_addr, u32 heap_size) { |
| @@ -305,7 +305,7 @@ static ResultCode ConnectToNamedPort(Core::System& system, Handle* out, VAddr po | |||
| 305 | 305 | ||
| 306 | // We succeeded. | 306 | // We succeeded. |
| 307 | handle_guard.Cancel(); | 307 | handle_guard.Cancel(); |
| 308 | return RESULT_SUCCESS; | 308 | return ResultSuccess; |
| 309 | } | 309 | } |
| 310 | 310 | ||
| 311 | static ResultCode ConnectToNamedPort32(Core::System& system, Handle* out_handle, | 311 | static ResultCode ConnectToNamedPort32(Core::System& system, Handle* out_handle, |
| @@ -349,7 +349,7 @@ static ResultCode GetThreadId(Core::System& system, u64* out_thread_id, Handle t | |||
| 349 | 349 | ||
| 350 | // Get the thread's id. | 350 | // Get the thread's id. |
| 351 | *out_thread_id = thread->GetId(); | 351 | *out_thread_id = thread->GetId(); |
| 352 | return RESULT_SUCCESS; | 352 | return ResultSuccess; |
| 353 | } | 353 | } |
| 354 | 354 | ||
| 355 | static ResultCode GetThreadId32(Core::System& system, u32* out_thread_id_low, | 355 | static ResultCode GetThreadId32(Core::System& system, u32* out_thread_id_low, |
| @@ -454,7 +454,7 @@ static ResultCode CancelSynchronization(Core::System& system, Handle handle) { | |||
| 454 | 454 | ||
| 455 | // Cancel the thread's wait. | 455 | // Cancel the thread's wait. |
| 456 | thread->WaitCancel(); | 456 | thread->WaitCancel(); |
| 457 | return RESULT_SUCCESS; | 457 | return ResultSuccess; |
| 458 | } | 458 | } |
| 459 | 459 | ||
| 460 | static ResultCode CancelSynchronization32(Core::System& system, Handle handle) { | 460 | static ResultCode CancelSynchronization32(Core::System& system, Handle handle) { |
| @@ -715,76 +715,76 @@ static ResultCode GetInfo(Core::System& system, u64* result, u64 info_id, Handle | |||
| 715 | switch (info_id_type) { | 715 | switch (info_id_type) { |
| 716 | case GetInfoType::AllowedCPUCoreMask: | 716 | case GetInfoType::AllowedCPUCoreMask: |
| 717 | *result = process->GetCoreMask(); | 717 | *result = process->GetCoreMask(); |
| 718 | return RESULT_SUCCESS; | 718 | return ResultSuccess; |
| 719 | 719 | ||
| 720 | case GetInfoType::AllowedThreadPriorityMask: | 720 | case GetInfoType::AllowedThreadPriorityMask: |
| 721 | *result = process->GetPriorityMask(); | 721 | *result = process->GetPriorityMask(); |
| 722 | return RESULT_SUCCESS; | 722 | return ResultSuccess; |
| 723 | 723 | ||
| 724 | case GetInfoType::MapRegionBaseAddr: | 724 | case GetInfoType::MapRegionBaseAddr: |
| 725 | *result = process->PageTable().GetAliasRegionStart(); | 725 | *result = process->PageTable().GetAliasRegionStart(); |
| 726 | return RESULT_SUCCESS; | 726 | return ResultSuccess; |
| 727 | 727 | ||
| 728 | case GetInfoType::MapRegionSize: | 728 | case GetInfoType::MapRegionSize: |
| 729 | *result = process->PageTable().GetAliasRegionSize(); | 729 | *result = process->PageTable().GetAliasRegionSize(); |
| 730 | return RESULT_SUCCESS; | 730 | return ResultSuccess; |
| 731 | 731 | ||
| 732 | case GetInfoType::HeapRegionBaseAddr: | 732 | case GetInfoType::HeapRegionBaseAddr: |
| 733 | *result = process->PageTable().GetHeapRegionStart(); | 733 | *result = process->PageTable().GetHeapRegionStart(); |
| 734 | return RESULT_SUCCESS; | 734 | return ResultSuccess; |
| 735 | 735 | ||
| 736 | case GetInfoType::HeapRegionSize: | 736 | case GetInfoType::HeapRegionSize: |
| 737 | *result = process->PageTable().GetHeapRegionSize(); | 737 | *result = process->PageTable().GetHeapRegionSize(); |
| 738 | return RESULT_SUCCESS; | 738 | return ResultSuccess; |
| 739 | 739 | ||
| 740 | case GetInfoType::ASLRRegionBaseAddr: | 740 | case GetInfoType::ASLRRegionBaseAddr: |
| 741 | *result = process->PageTable().GetAliasCodeRegionStart(); | 741 | *result = process->PageTable().GetAliasCodeRegionStart(); |
| 742 | return RESULT_SUCCESS; | 742 | return ResultSuccess; |
| 743 | 743 | ||
| 744 | case GetInfoType::ASLRRegionSize: | 744 | case GetInfoType::ASLRRegionSize: |
| 745 | *result = process->PageTable().GetAliasCodeRegionSize(); | 745 | *result = process->PageTable().GetAliasCodeRegionSize(); |
| 746 | return RESULT_SUCCESS; | 746 | return ResultSuccess; |
| 747 | 747 | ||
| 748 | case GetInfoType::StackRegionBaseAddr: | 748 | case GetInfoType::StackRegionBaseAddr: |
| 749 | *result = process->PageTable().GetStackRegionStart(); | 749 | *result = process->PageTable().GetStackRegionStart(); |
| 750 | return RESULT_SUCCESS; | 750 | return ResultSuccess; |
| 751 | 751 | ||
| 752 | case GetInfoType::StackRegionSize: | 752 | case GetInfoType::StackRegionSize: |
| 753 | *result = process->PageTable().GetStackRegionSize(); | 753 | *result = process->PageTable().GetStackRegionSize(); |
| 754 | return RESULT_SUCCESS; | 754 | return ResultSuccess; |
| 755 | 755 | ||
| 756 | case GetInfoType::TotalPhysicalMemoryAvailable: | 756 | case GetInfoType::TotalPhysicalMemoryAvailable: |
| 757 | *result = process->GetTotalPhysicalMemoryAvailable(); | 757 | *result = process->GetTotalPhysicalMemoryAvailable(); |
| 758 | return RESULT_SUCCESS; | 758 | return ResultSuccess; |
| 759 | 759 | ||
| 760 | case GetInfoType::TotalPhysicalMemoryUsed: | 760 | case GetInfoType::TotalPhysicalMemoryUsed: |
| 761 | *result = process->GetTotalPhysicalMemoryUsed(); | 761 | *result = process->GetTotalPhysicalMemoryUsed(); |
| 762 | return RESULT_SUCCESS; | 762 | return ResultSuccess; |
| 763 | 763 | ||
| 764 | case GetInfoType::SystemResourceSize: | 764 | case GetInfoType::SystemResourceSize: |
| 765 | *result = process->GetSystemResourceSize(); | 765 | *result = process->GetSystemResourceSize(); |
| 766 | return RESULT_SUCCESS; | 766 | return ResultSuccess; |
| 767 | 767 | ||
| 768 | case GetInfoType::SystemResourceUsage: | 768 | case GetInfoType::SystemResourceUsage: |
| 769 | LOG_WARNING(Kernel_SVC, "(STUBBED) Attempted to query system resource usage"); | 769 | LOG_WARNING(Kernel_SVC, "(STUBBED) Attempted to query system resource usage"); |
| 770 | *result = process->GetSystemResourceUsage(); | 770 | *result = process->GetSystemResourceUsage(); |
| 771 | return RESULT_SUCCESS; | 771 | return ResultSuccess; |
| 772 | 772 | ||
| 773 | case GetInfoType::TitleId: | 773 | case GetInfoType::TitleId: |
| 774 | *result = process->GetTitleID(); | 774 | *result = process->GetTitleID(); |
| 775 | return RESULT_SUCCESS; | 775 | return ResultSuccess; |
| 776 | 776 | ||
| 777 | case GetInfoType::UserExceptionContextAddr: | 777 | case GetInfoType::UserExceptionContextAddr: |
| 778 | *result = process->GetTLSRegionAddress(); | 778 | *result = process->GetTLSRegionAddress(); |
| 779 | return RESULT_SUCCESS; | 779 | return ResultSuccess; |
| 780 | 780 | ||
| 781 | case GetInfoType::TotalPhysicalMemoryAvailableWithoutSystemResource: | 781 | case GetInfoType::TotalPhysicalMemoryAvailableWithoutSystemResource: |
| 782 | *result = process->GetTotalPhysicalMemoryAvailableWithoutSystemResource(); | 782 | *result = process->GetTotalPhysicalMemoryAvailableWithoutSystemResource(); |
| 783 | return RESULT_SUCCESS; | 783 | return ResultSuccess; |
| 784 | 784 | ||
| 785 | case GetInfoType::TotalPhysicalMemoryUsedWithoutSystemResource: | 785 | case GetInfoType::TotalPhysicalMemoryUsedWithoutSystemResource: |
| 786 | *result = process->GetTotalPhysicalMemoryUsedWithoutSystemResource(); | 786 | *result = process->GetTotalPhysicalMemoryUsedWithoutSystemResource(); |
| 787 | return RESULT_SUCCESS; | 787 | return ResultSuccess; |
| 788 | 788 | ||
| 789 | default: | 789 | default: |
| 790 | break; | 790 | break; |
| @@ -796,7 +796,7 @@ static ResultCode GetInfo(Core::System& system, u64* result, u64 info_id, Handle | |||
| 796 | 796 | ||
| 797 | case GetInfoType::IsCurrentProcessBeingDebugged: | 797 | case GetInfoType::IsCurrentProcessBeingDebugged: |
| 798 | *result = 0; | 798 | *result = 0; |
| 799 | return RESULT_SUCCESS; | 799 | return ResultSuccess; |
| 800 | 800 | ||
| 801 | case GetInfoType::RegisterResourceLimit: { | 801 | case GetInfoType::RegisterResourceLimit: { |
| 802 | if (handle != 0) { | 802 | if (handle != 0) { |
| @@ -816,14 +816,14 @@ static ResultCode GetInfo(Core::System& system, u64* result, u64 info_id, Handle | |||
| 816 | if (!resource_limit) { | 816 | if (!resource_limit) { |
| 817 | *result = Svc::InvalidHandle; | 817 | *result = Svc::InvalidHandle; |
| 818 | // Yes, the kernel considers this a successful operation. | 818 | // Yes, the kernel considers this a successful operation. |
| 819 | return RESULT_SUCCESS; | 819 | return ResultSuccess; |
| 820 | } | 820 | } |
| 821 | 821 | ||
| 822 | Handle resource_handle{}; | 822 | Handle resource_handle{}; |
| 823 | R_TRY(handle_table.Add(&resource_handle, resource_limit)); | 823 | R_TRY(handle_table.Add(&resource_handle, resource_limit)); |
| 824 | 824 | ||
| 825 | *result = resource_handle; | 825 | *result = resource_handle; |
| 826 | return RESULT_SUCCESS; | 826 | return ResultSuccess; |
| 827 | } | 827 | } |
| 828 | 828 | ||
| 829 | case GetInfoType::RandomEntropy: | 829 | case GetInfoType::RandomEntropy: |
| @@ -840,13 +840,13 @@ static ResultCode GetInfo(Core::System& system, u64* result, u64 info_id, Handle | |||
| 840 | } | 840 | } |
| 841 | 841 | ||
| 842 | *result = system.Kernel().CurrentProcess()->GetRandomEntropy(info_sub_id); | 842 | *result = system.Kernel().CurrentProcess()->GetRandomEntropy(info_sub_id); |
| 843 | return RESULT_SUCCESS; | 843 | return ResultSuccess; |
| 844 | 844 | ||
| 845 | case GetInfoType::PrivilegedProcessId: | 845 | case GetInfoType::PrivilegedProcessId: |
| 846 | LOG_WARNING(Kernel_SVC, | 846 | LOG_WARNING(Kernel_SVC, |
| 847 | "(STUBBED) Attempted to query privileged process id bounds, returned 0"); | 847 | "(STUBBED) Attempted to query privileged process id bounds, returned 0"); |
| 848 | *result = 0; | 848 | *result = 0; |
| 849 | return RESULT_SUCCESS; | 849 | return ResultSuccess; |
| 850 | 850 | ||
| 851 | case GetInfoType::ThreadTickCount: { | 851 | case GetInfoType::ThreadTickCount: { |
| 852 | constexpr u64 num_cpus = 4; | 852 | constexpr u64 num_cpus = 4; |
| @@ -881,7 +881,7 @@ static ResultCode GetInfo(Core::System& system, u64* result, u64 info_id, Handle | |||
| 881 | } | 881 | } |
| 882 | 882 | ||
| 883 | *result = out_ticks; | 883 | *result = out_ticks; |
| 884 | return RESULT_SUCCESS; | 884 | return ResultSuccess; |
| 885 | } | 885 | } |
| 886 | 886 | ||
| 887 | default: | 887 | default: |
| @@ -1034,7 +1034,7 @@ static ResultCode SetThreadActivity(Core::System& system, Handle thread_handle, | |||
| 1034 | // Set the activity. | 1034 | // Set the activity. |
| 1035 | R_TRY(thread->SetActivity(thread_activity)); | 1035 | R_TRY(thread->SetActivity(thread_activity)); |
| 1036 | 1036 | ||
| 1037 | return RESULT_SUCCESS; | 1037 | return ResultSuccess; |
| 1038 | } | 1038 | } |
| 1039 | 1039 | ||
| 1040 | static ResultCode SetThreadActivity32(Core::System& system, Handle thread_handle, | 1040 | static ResultCode SetThreadActivity32(Core::System& system, Handle thread_handle, |
| @@ -1094,10 +1094,10 @@ static ResultCode GetThreadContext(Core::System& system, VAddr out_context, Hand | |||
| 1094 | // Copy the thread context to user space. | 1094 | // Copy the thread context to user space. |
| 1095 | system.Memory().WriteBlock(out_context, context.data(), context.size()); | 1095 | system.Memory().WriteBlock(out_context, context.data(), context.size()); |
| 1096 | 1096 | ||
| 1097 | return RESULT_SUCCESS; | 1097 | return ResultSuccess; |
| 1098 | } | 1098 | } |
| 1099 | 1099 | ||
| 1100 | return RESULT_SUCCESS; | 1100 | return ResultSuccess; |
| 1101 | } | 1101 | } |
| 1102 | 1102 | ||
| 1103 | static ResultCode GetThreadContext32(Core::System& system, u32 out_context, Handle thread_handle) { | 1103 | static ResultCode GetThreadContext32(Core::System& system, u32 out_context, Handle thread_handle) { |
| @@ -1115,7 +1115,7 @@ static ResultCode GetThreadPriority(Core::System& system, u32* out_priority, Han | |||
| 1115 | 1115 | ||
| 1116 | // Get the thread's priority. | 1116 | // Get the thread's priority. |
| 1117 | *out_priority = thread->GetPriority(); | 1117 | *out_priority = thread->GetPriority(); |
| 1118 | return RESULT_SUCCESS; | 1118 | return ResultSuccess; |
| 1119 | } | 1119 | } |
| 1120 | 1120 | ||
| 1121 | static ResultCode GetThreadPriority32(Core::System& system, u32* out_priority, Handle handle) { | 1121 | static ResultCode GetThreadPriority32(Core::System& system, u32* out_priority, Handle handle) { |
| @@ -1138,7 +1138,7 @@ static ResultCode SetThreadPriority(Core::System& system, Handle thread_handle, | |||
| 1138 | 1138 | ||
| 1139 | // Set the thread priority. | 1139 | // Set the thread priority. |
| 1140 | thread->SetBasePriority(priority); | 1140 | thread->SetBasePriority(priority); |
| 1141 | return RESULT_SUCCESS; | 1141 | return ResultSuccess; |
| 1142 | } | 1142 | } |
| 1143 | 1143 | ||
| 1144 | static ResultCode SetThreadPriority32(Core::System& system, Handle thread_handle, u32 priority) { | 1144 | static ResultCode SetThreadPriority32(Core::System& system, Handle thread_handle, u32 priority) { |
| @@ -1207,7 +1207,7 @@ static ResultCode MapSharedMemory(Core::System& system, Handle shmem_handle, VAd | |||
| 1207 | 1207 | ||
| 1208 | // We succeeded. | 1208 | // We succeeded. |
| 1209 | guard.Cancel(); | 1209 | guard.Cancel(); |
| 1210 | return RESULT_SUCCESS; | 1210 | return ResultSuccess; |
| 1211 | } | 1211 | } |
| 1212 | 1212 | ||
| 1213 | static ResultCode MapSharedMemory32(Core::System& system, Handle shmem_handle, u32 address, | 1213 | static ResultCode MapSharedMemory32(Core::System& system, Handle shmem_handle, u32 address, |
| @@ -1240,7 +1240,7 @@ static ResultCode UnmapSharedMemory(Core::System& system, Handle shmem_handle, V | |||
| 1240 | // Remove the shared memory from the process. | 1240 | // Remove the shared memory from the process. |
| 1241 | process.RemoveSharedMemory(shmem.GetPointerUnsafe(), address, size); | 1241 | process.RemoveSharedMemory(shmem.GetPointerUnsafe(), address, size); |
| 1242 | 1242 | ||
| 1243 | return RESULT_SUCCESS; | 1243 | return ResultSuccess; |
| 1244 | } | 1244 | } |
| 1245 | 1245 | ||
| 1246 | static ResultCode UnmapSharedMemory32(Core::System& system, Handle shmem_handle, u32 address, | 1246 | static ResultCode UnmapSharedMemory32(Core::System& system, Handle shmem_handle, u32 address, |
| @@ -1276,7 +1276,7 @@ static ResultCode QueryProcessMemory(Core::System& system, VAddr memory_info_add | |||
| 1276 | // Page info appears to be currently unused by the kernel and is always set to zero. | 1276 | // Page info appears to be currently unused by the kernel and is always set to zero. |
| 1277 | memory.Write32(page_info_address, 0); | 1277 | memory.Write32(page_info_address, 0); |
| 1278 | 1278 | ||
| 1279 | return RESULT_SUCCESS; | 1279 | return ResultSuccess; |
| 1280 | } | 1280 | } |
| 1281 | 1281 | ||
| 1282 | static ResultCode QueryMemory(Core::System& system, VAddr memory_info_address, | 1282 | static ResultCode QueryMemory(Core::System& system, VAddr memory_info_address, |
| @@ -1524,7 +1524,7 @@ static ResultCode CreateThread(Core::System& system, Handle* out_handle, VAddr e | |||
| 1524 | // Add the thread to the handle table. | 1524 | // Add the thread to the handle table. |
| 1525 | R_TRY(process.GetHandleTable().Add(out_handle, thread)); | 1525 | R_TRY(process.GetHandleTable().Add(out_handle, thread)); |
| 1526 | 1526 | ||
| 1527 | return RESULT_SUCCESS; | 1527 | return ResultSuccess; |
| 1528 | } | 1528 | } |
| 1529 | 1529 | ||
| 1530 | static ResultCode CreateThread32(Core::System& system, Handle* out_handle, u32 priority, | 1530 | static ResultCode CreateThread32(Core::System& system, Handle* out_handle, u32 priority, |
| @@ -1547,7 +1547,7 @@ static ResultCode StartThread(Core::System& system, Handle thread_handle) { | |||
| 1547 | // If we succeeded, persist a reference to the thread. | 1547 | // If we succeeded, persist a reference to the thread. |
| 1548 | thread->Open(); | 1548 | thread->Open(); |
| 1549 | 1549 | ||
| 1550 | return RESULT_SUCCESS; | 1550 | return ResultSuccess; |
| 1551 | } | 1551 | } |
| 1552 | 1552 | ||
| 1553 | static ResultCode StartThread32(Core::System& system, Handle thread_handle) { | 1553 | static ResultCode StartThread32(Core::System& system, Handle thread_handle) { |
| @@ -1796,7 +1796,7 @@ static ResultCode CloseHandle(Core::System& system, Handle handle) { | |||
| 1796 | R_UNLESS(system.Kernel().CurrentProcess()->GetHandleTable().Remove(handle), | 1796 | R_UNLESS(system.Kernel().CurrentProcess()->GetHandleTable().Remove(handle), |
| 1797 | ResultInvalidHandle); | 1797 | ResultInvalidHandle); |
| 1798 | 1798 | ||
| 1799 | return RESULT_SUCCESS; | 1799 | return ResultSuccess; |
| 1800 | } | 1800 | } |
| 1801 | 1801 | ||
| 1802 | static ResultCode CloseHandle32(Core::System& system, Handle handle) { | 1802 | static ResultCode CloseHandle32(Core::System& system, Handle handle) { |
| @@ -1891,7 +1891,7 @@ static ResultCode CreateTransferMemory(Core::System& system, Handle* out, VAddr | |||
| 1891 | // Add the transfer memory to the handle table. | 1891 | // Add the transfer memory to the handle table. |
| 1892 | R_TRY(handle_table.Add(out, trmem)); | 1892 | R_TRY(handle_table.Add(out, trmem)); |
| 1893 | 1893 | ||
| 1894 | return RESULT_SUCCESS; | 1894 | return ResultSuccess; |
| 1895 | } | 1895 | } |
| 1896 | 1896 | ||
| 1897 | static ResultCode CreateTransferMemory32(Core::System& system, Handle* out, u32 address, u32 size, | 1897 | static ResultCode CreateTransferMemory32(Core::System& system, Handle* out, u32 address, u32 size, |
| @@ -1911,7 +1911,7 @@ static ResultCode GetThreadCoreMask(Core::System& system, Handle thread_handle, | |||
| 1911 | // Get the core mask. | 1911 | // Get the core mask. |
| 1912 | R_TRY(thread->GetCoreMask(out_core_id, out_affinity_mask)); | 1912 | R_TRY(thread->GetCoreMask(out_core_id, out_affinity_mask)); |
| 1913 | 1913 | ||
| 1914 | return RESULT_SUCCESS; | 1914 | return ResultSuccess; |
| 1915 | } | 1915 | } |
| 1916 | 1916 | ||
| 1917 | static ResultCode GetThreadCoreMask32(Core::System& system, Handle thread_handle, s32* out_core_id, | 1917 | static ResultCode GetThreadCoreMask32(Core::System& system, Handle thread_handle, s32* out_core_id, |
| @@ -1952,7 +1952,7 @@ static ResultCode SetThreadCoreMask(Core::System& system, Handle thread_handle, | |||
| 1952 | // Set the core mask. | 1952 | // Set the core mask. |
| 1953 | R_TRY(thread->SetCoreMask(core_id, affinity_mask)); | 1953 | R_TRY(thread->SetCoreMask(core_id, affinity_mask)); |
| 1954 | 1954 | ||
| 1955 | return RESULT_SUCCESS; | 1955 | return ResultSuccess; |
| 1956 | } | 1956 | } |
| 1957 | 1957 | ||
| 1958 | static ResultCode SetThreadCoreMask32(Core::System& system, Handle thread_handle, s32 core_id, | 1958 | static ResultCode SetThreadCoreMask32(Core::System& system, Handle thread_handle, s32 core_id, |
| @@ -2051,7 +2051,7 @@ static ResultCode CreateEvent(Core::System& system, Handle* out_write, Handle* o | |||
| 2051 | 2051 | ||
| 2052 | // We succeeded. | 2052 | // We succeeded. |
| 2053 | handle_guard.Cancel(); | 2053 | handle_guard.Cancel(); |
| 2054 | return RESULT_SUCCESS; | 2054 | return ResultSuccess; |
| 2055 | } | 2055 | } |
| 2056 | 2056 | ||
| 2057 | static ResultCode CreateEvent32(Core::System& system, Handle* out_write, Handle* out_read) { | 2057 | static ResultCode CreateEvent32(Core::System& system, Handle* out_write, Handle* out_read) { |
| @@ -2081,7 +2081,7 @@ static ResultCode GetProcessInfo(Core::System& system, u64* out, Handle process_ | |||
| 2081 | } | 2081 | } |
| 2082 | 2082 | ||
| 2083 | *out = static_cast<u64>(process->GetStatus()); | 2083 | *out = static_cast<u64>(process->GetStatus()); |
| 2084 | return RESULT_SUCCESS; | 2084 | return ResultSuccess; |
| 2085 | } | 2085 | } |
| 2086 | 2086 | ||
| 2087 | static ResultCode CreateResourceLimit(Core::System& system, Handle* out_handle) { | 2087 | static ResultCode CreateResourceLimit(Core::System& system, Handle* out_handle) { |
| @@ -2104,7 +2104,7 @@ static ResultCode CreateResourceLimit(Core::System& system, Handle* out_handle) | |||
| 2104 | // Add the limit to the handle table. | 2104 | // Add the limit to the handle table. |
| 2105 | R_TRY(kernel.CurrentProcess()->GetHandleTable().Add(out_handle, resource_limit)); | 2105 | R_TRY(kernel.CurrentProcess()->GetHandleTable().Add(out_handle, resource_limit)); |
| 2106 | 2106 | ||
| 2107 | return RESULT_SUCCESS; | 2107 | return ResultSuccess; |
| 2108 | } | 2108 | } |
| 2109 | 2109 | ||
| 2110 | static ResultCode GetResourceLimitLimitValue(Core::System& system, u64* out_limit_value, | 2110 | static ResultCode GetResourceLimitLimitValue(Core::System& system, u64* out_limit_value, |
| @@ -2125,7 +2125,7 @@ static ResultCode GetResourceLimitLimitValue(Core::System& system, u64* out_limi | |||
| 2125 | // Get the limit value. | 2125 | // Get the limit value. |
| 2126 | *out_limit_value = resource_limit->GetLimitValue(which); | 2126 | *out_limit_value = resource_limit->GetLimitValue(which); |
| 2127 | 2127 | ||
| 2128 | return RESULT_SUCCESS; | 2128 | return ResultSuccess; |
| 2129 | } | 2129 | } |
| 2130 | 2130 | ||
| 2131 | static ResultCode GetResourceLimitCurrentValue(Core::System& system, u64* out_current_value, | 2131 | static ResultCode GetResourceLimitCurrentValue(Core::System& system, u64* out_current_value, |
| @@ -2146,7 +2146,7 @@ static ResultCode GetResourceLimitCurrentValue(Core::System& system, u64* out_cu | |||
| 2146 | // Get the current value. | 2146 | // Get the current value. |
| 2147 | *out_current_value = resource_limit->GetCurrentValue(which); | 2147 | *out_current_value = resource_limit->GetCurrentValue(which); |
| 2148 | 2148 | ||
| 2149 | return RESULT_SUCCESS; | 2149 | return ResultSuccess; |
| 2150 | } | 2150 | } |
| 2151 | 2151 | ||
| 2152 | static ResultCode SetResourceLimitLimitValue(Core::System& system, Handle resource_limit_handle, | 2152 | static ResultCode SetResourceLimitLimitValue(Core::System& system, Handle resource_limit_handle, |
| @@ -2166,7 +2166,7 @@ static ResultCode SetResourceLimitLimitValue(Core::System& system, Handle resour | |||
| 2166 | // Set the limit value. | 2166 | // Set the limit value. |
| 2167 | R_TRY(resource_limit->SetLimitValue(which, limit_value)); | 2167 | R_TRY(resource_limit->SetLimitValue(which, limit_value)); |
| 2168 | 2168 | ||
| 2169 | return RESULT_SUCCESS; | 2169 | return ResultSuccess; |
| 2170 | } | 2170 | } |
| 2171 | 2171 | ||
| 2172 | static ResultCode GetProcessList(Core::System& system, u32* out_num_processes, | 2172 | static ResultCode GetProcessList(Core::System& system, u32* out_num_processes, |
| @@ -2203,7 +2203,7 @@ static ResultCode GetProcessList(Core::System& system, u32* out_num_processes, | |||
| 2203 | } | 2203 | } |
| 2204 | 2204 | ||
| 2205 | *out_num_processes = static_cast<u32>(num_processes); | 2205 | *out_num_processes = static_cast<u32>(num_processes); |
| 2206 | return RESULT_SUCCESS; | 2206 | return ResultSuccess; |
| 2207 | } | 2207 | } |
| 2208 | 2208 | ||
| 2209 | static ResultCode GetThreadList(Core::System& system, u32* out_num_threads, VAddr out_thread_ids, | 2209 | static ResultCode GetThreadList(Core::System& system, u32* out_num_threads, VAddr out_thread_ids, |
| @@ -2243,7 +2243,7 @@ static ResultCode GetThreadList(Core::System& system, u32* out_num_threads, VAdd | |||
| 2243 | } | 2243 | } |
| 2244 | 2244 | ||
| 2245 | *out_num_threads = static_cast<u32>(num_threads); | 2245 | *out_num_threads = static_cast<u32>(num_threads); |
| 2246 | return RESULT_SUCCESS; | 2246 | return ResultSuccess; |
| 2247 | } | 2247 | } |
| 2248 | 2248 | ||
| 2249 | static ResultCode FlushProcessDataCache32([[maybe_unused]] Core::System& system, | 2249 | static ResultCode FlushProcessDataCache32([[maybe_unused]] Core::System& system, |
| @@ -2253,7 +2253,7 @@ static ResultCode FlushProcessDataCache32([[maybe_unused]] Core::System& system, | |||
| 2253 | // as all emulation is done in the same cache level in host architecture, thus data cache | 2253 | // as all emulation is done in the same cache level in host architecture, thus data cache |
| 2254 | // does not need flushing. | 2254 | // does not need flushing. |
| 2255 | LOG_DEBUG(Kernel_SVC, "called"); | 2255 | LOG_DEBUG(Kernel_SVC, "called"); |
| 2256 | return RESULT_SUCCESS; | 2256 | return ResultSuccess; |
| 2257 | } | 2257 | } |
| 2258 | 2258 | ||
| 2259 | namespace { | 2259 | namespace { |