From dc8479928c5aee4c6ad6fe4f59006fb604cee701 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sun, 18 Sep 2016 09:38:01 +0900 Subject: Sources: Run clang-format on everything. --- src/core/hle/kernel/kernel.h | 66 +++++++++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 28 deletions(-) (limited to 'src/core/hle/kernel/kernel.h') diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h index 27ba3f912..cc39652d5 100644 --- a/src/core/hle/kernel/kernel.h +++ b/src/core/hle/kernel/kernel.h @@ -23,48 +23,55 @@ class Thread; // TODO: Verify code const ResultCode ERR_OUT_OF_HANDLES(ErrorDescription::OutOfMemory, ErrorModule::Kernel, - ErrorSummary::OutOfResource, ErrorLevel::Temporary); + ErrorSummary::OutOfResource, ErrorLevel::Temporary); // TOOD: Verify code const ResultCode ERR_INVALID_HANDLE(ErrorDescription::InvalidHandle, ErrorModule::Kernel, - ErrorSummary::InvalidArgument, ErrorLevel::Permanent); + ErrorSummary::InvalidArgument, ErrorLevel::Permanent); enum KernelHandle : Handle { - CurrentThread = 0xFFFF8000, - CurrentProcess = 0xFFFF8001, + CurrentThread = 0xFFFF8000, + CurrentProcess = 0xFFFF8001, }; enum class HandleType : u32 { - Unknown = 0, - - Session = 2, - Event = 3, - Mutex = 4, - SharedMemory = 5, - Redirection = 6, - Thread = 7, - Process = 8, - AddressArbiter = 9, - Semaphore = 10, - Timer = 11, - ResourceLimit = 12, - CodeSet = 13, - ClientPort = 14, - ServerPort = 15, + Unknown = 0, + + Session = 2, + Event = 3, + Mutex = 4, + SharedMemory = 5, + Redirection = 6, + Thread = 7, + Process = 8, + AddressArbiter = 9, + Semaphore = 10, + Timer = 11, + ResourceLimit = 12, + CodeSet = 13, + ClientPort = 14, + ServerPort = 15, }; enum { - DEFAULT_STACK_SIZE = 0x4000, + DEFAULT_STACK_SIZE = 0x4000, }; class Object : NonCopyable { public: - virtual ~Object() {} + virtual ~Object() { + } /// Returns a unique identifier for the object. For debugging purposes only. - unsigned int GetObjectId() const { return object_id; } + unsigned int GetObjectId() const { + return object_id; + } - virtual std::string GetTypeName() const { return "[BAD KERNEL OBJECT TYPE]"; } - virtual std::string GetName() const { return "[UNKNOWN KERNEL OBJECT]"; } + virtual std::string GetTypeName() const { + return "[BAD KERNEL OBJECT TYPE]"; + } + virtual std::string GetName() const { + return "[UNKNOWN KERNEL OBJECT]"; + } virtual Kernel::HandleType GetHandleType() const = 0; /** @@ -122,7 +129,6 @@ using SharedPtr = boost::intrusive_ptr; /// Class that represents a Kernel object that a thread can be waiting on class WaitObject : public Object { public: - /** * Check if the current thread should wait until the object is available * @return True if the current thread should wait due to this object being unavailable @@ -247,8 +253,12 @@ private: */ static const size_t MAX_COUNT = 4096; - static u16 GetSlot(Handle handle) { return handle >> 15; } - static u16 GetGeneration(Handle handle) { return handle & 0x7FFF; } + static u16 GetSlot(Handle handle) { + return handle >> 15; + } + static u16 GetGeneration(Handle handle) { + return handle & 0x7FFF; + } /// Stores the Object referenced by the handle or null if the slot is empty. std::array, MAX_COUNT> objects; -- cgit v1.2.3