Update the entire application to use the new clang format style

This commit is contained in:
James Rowe 2018-03-09 10:54:43 -07:00
parent ed36edf69c
commit f61141e86a
148 changed files with 955 additions and 552 deletions

View file

@ -39,4 +39,4 @@ ResultVal<SharedPtr<ClientSession>> ClientPort::Connect() {
return MakeResult(std::get<SharedPtr<ClientSession>>(sessions));
}
} // namespace
} // namespace Kernel

View file

@ -47,4 +47,4 @@ private:
~ClientPort() override;
};
} // namespace
} // namespace Kernel

View file

@ -52,4 +52,4 @@ ResultCode ClientSession::SendSyncRequest(SharedPtr<Thread> thread) {
return server->HandleSyncRequest(std::move(thread));
}
} // namespace
} // namespace Kernel

View file

@ -50,4 +50,4 @@ private:
~ClientSession() override;
};
} // namespace
} // namespace Kernel

View file

@ -52,4 +52,4 @@ void Event::WakeupAllWaitingThreads() {
signaled = false;
}
} // namespace
} // namespace Kernel

View file

@ -49,4 +49,4 @@ private:
~Event() override;
};
} // namespace
} // namespace Kernel

View file

@ -94,4 +94,4 @@ void HandleTable::Clear() {
next_free_slot = 0;
}
} // namespace
} // namespace Kernel

View file

@ -123,4 +123,4 @@ private:
extern HandleTable g_handle_table;
} // namespace
} // namespace Kernel

View file

@ -36,8 +36,9 @@ SharedPtr<Event> HLERequestContext::SleepClientThread(SharedPtr<Thread> thread,
std::chrono::nanoseconds timeout,
WakeupCallback&& callback) {
// Put the client thread to sleep until the wait event is signaled or the timeout expires.
thread->wakeup_callback = [ context = *this, callback ](
ThreadWakeupReason reason, SharedPtr<Thread> thread, SharedPtr<WaitObject> object) mutable {
thread->wakeup_callback = [context = *this, callback](ThreadWakeupReason reason,
SharedPtr<Thread> thread,
SharedPtr<WaitObject> object) mutable {
ASSERT(thread->status == THREADSTATUS_WAIT_HLE_EVENT);
callback(thread, context, reason);

View file

@ -45,4 +45,4 @@ void Shutdown() {
Kernel::MemoryShutdown();
}
} // namespace
} // namespace Kernel

View file

@ -126,8 +126,9 @@ void HandleSpecialMapping(VMManager& address_space, const AddressMapping& mappin
mapping_limit <= area.vaddr_base + area.size;
});
if (area == std::end(memory_areas)) {
LOG_ERROR(Loader, "Unhandled special mapping: address=0x%08" PRIX32 " size=0x%" PRIX32
" read_only=%d unk_flag=%d",
LOG_ERROR(Loader,
"Unhandled special mapping: address=0x%08" PRIX32 " size=0x%" PRIX32
" read_only=%d unk_flag=%d",
mapping.address, mapping.size, mapping.read_only, mapping.unk_flag);
return;
}

View file

@ -151,4 +151,4 @@ void ResourceLimitsInit() {
void ResourceLimitsShutdown() {}
} // namespace
} // namespace Kernel

View file

@ -123,4 +123,4 @@ void ResourceLimitsInit();
// Destroys the resource limits
void ResourceLimitsShutdown();
} // namespace
} // namespace Kernel

View file

@ -52,4 +52,4 @@ ResultVal<s32> Semaphore::Release(s32 release_count) {
return MakeResult<s32>(previous_count);
}
} // namespace
} // namespace Kernel

View file

@ -4,8 +4,8 @@
#pragma once
#include <queue>
#include <string>
#include <queue>
#include "common/common_types.h"
#include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/wait_object.h"
@ -56,4 +56,4 @@ private:
~Semaphore() override;
};
} // namespace
} // namespace Kernel

View file

@ -50,4 +50,4 @@ std::tuple<SharedPtr<ServerPort>, SharedPtr<ClientPort>> ServerPort::CreatePortP
return std::make_tuple(std::move(server_port), std::move(client_port));
}
} // namespace
} // namespace Kernel

View file

@ -72,4 +72,4 @@ private:
~ServerPort() override;
};
} // namespace
} // namespace Kernel

View file

@ -9,4 +9,4 @@ namespace Kernel {
Session::Session() {}
Session::~Session() {}
}
} // namespace Kernel

View file

@ -24,4 +24,4 @@ public:
ServerSession* server = nullptr; ///< The server endpoint of the session.
SharedPtr<ClientPort> port; ///< The port that this session is associated with (optional).
};
}
} // namespace Kernel

View file

@ -98,10 +98,10 @@ public:
ResultCode Unmap(Process* target_process, VAddr address);
/**
* Gets a pointer to the shared memory block
* @param offset Offset from the start of the shared memory block to get pointer
* @return Pointer to the shared memory block from the specified offset
*/
* Gets a pointer to the shared memory block
* @param offset Offset from the start of the shared memory block to get pointer
* @return Pointer to the shared memory block from the specified offset
*/
u8* GetPointer(u32 offset = 0);
/// Process that created this shared memory block.
@ -129,4 +129,4 @@ private:
~SharedMemory() override;
};
} // namespace
} // namespace Kernel

View file

@ -288,7 +288,6 @@ static ResultCode WaitSynchronization1(Handle handle, s64 nano_seconds) {
thread->wakeup_callback = [](ThreadWakeupReason reason, SharedPtr<Thread> thread,
SharedPtr<WaitObject> object) {
ASSERT(thread->status == THREADSTATUS_WAIT_SYNCH_ANY);
if (reason == ThreadWakeupReason::Timeout) {
@ -378,7 +377,6 @@ static ResultCode WaitSynchronizationN(s32* out, VAddr handles_address, s32 hand
thread->wakeup_callback = [](ThreadWakeupReason reason, SharedPtr<Thread> thread,
SharedPtr<WaitObject> object) {
ASSERT(thread->status == THREADSTATUS_WAIT_SYNCH_ALL);
if (reason == ThreadWakeupReason::Timeout) {
@ -439,7 +437,6 @@ static ResultCode WaitSynchronizationN(s32* out, VAddr handles_address, s32 hand
thread->wakeup_callback = [](ThreadWakeupReason reason, SharedPtr<Thread> thread,
SharedPtr<WaitObject> object) {
ASSERT(thread->status == THREADSTATUS_WAIT_SYNCH_ANY);
if (reason == ThreadWakeupReason::Timeout) {
@ -591,7 +588,6 @@ static ResultCode ReplyAndReceive(s32* index, VAddr handles_address, s32 handle_
thread->wakeup_callback = [](ThreadWakeupReason reason, SharedPtr<Thread> thread,
SharedPtr<WaitObject> object) {
ASSERT(thread->status == THREADSTATUS_WAIT_SYNCH_ANY);
ASSERT(reason == ThreadWakeupReason::Signal);
@ -770,8 +766,9 @@ static ResultCode CreateThread(Handle* out_handle, u32 priority, u32 entry_point
Core::System::GetInstance().PrepareReschedule();
LOG_TRACE(Kernel_SVC, "called entrypoint=0x%08X (%s), arg=0x%08X, stacktop=0x%08X, "
"threadpriority=0x%08X, processorid=0x%08X : created handle=0x%08X",
LOG_TRACE(Kernel_SVC,
"called entrypoint=0x%08X (%s), arg=0x%08X, stacktop=0x%08X, "
"threadpriority=0x%08X, processorid=0x%08X : created handle=0x%08X",
entry_point, name.c_str(), arg, stack_top, priority, processor_id, *out_handle);
return RESULT_SUCCESS;

View file

@ -111,4 +111,4 @@ void TimersInit() {
void TimersShutdown() {}
} // namespace
} // namespace Kernel

View file

@ -76,4 +76,4 @@ void TimersInit();
/// Tears down the timer variables
void TimersShutdown();
} // namespace
} // namespace Kernel