summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-09-24 07:21:07 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-09-24 21:52:05 +0200
commit73666fb2622a5f6a7ab9f92c9a46ce2e215c4e83 (patch)
tree31ecba073091bae2a424f3d0b6215591408edca3 /src/core/hle
parentci: Update clang format version (diff)
downloadyuzu-73666fb2622a5f6a7ab9f92c9a46ce2e215c4e83.tar
yuzu-73666fb2622a5f6a7ab9f92c9a46ce2e215c4e83.tar.gz
yuzu-73666fb2622a5f6a7ab9f92c9a46ce2e215c4e83.tar.bz2
yuzu-73666fb2622a5f6a7ab9f92c9a46ce2e215c4e83.tar.lz
yuzu-73666fb2622a5f6a7ab9f92c9a46ce2e215c4e83.tar.xz
yuzu-73666fb2622a5f6a7ab9f92c9a46ce2e215c4e83.tar.zst
yuzu-73666fb2622a5f6a7ab9f92c9a46ce2e215c4e83.zip
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/kernel/k_priority_queue.h27
-rw-r--r--src/core/hle/kernel/k_scheduler.h2
-rw-r--r--src/core/hle/kernel/k_scoped_lock.h15
-rw-r--r--src/core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h2
4 files changed, 19 insertions, 27 deletions
diff --git a/src/core/hle/kernel/k_priority_queue.h b/src/core/hle/kernel/k_priority_queue.h
index 4aa669d95..f4d71ad7e 100644
--- a/src/core/hle/kernel/k_priority_queue.h
+++ b/src/core/hle/kernel/k_priority_queue.h
@@ -22,12 +22,10 @@ class KThread;
template <typename T>
concept KPriorityQueueAffinityMask = !std::is_reference_v<T> && requires(T & t) {
- { t.GetAffinityMask() }
- ->Common::ConvertibleTo<u64>;
+ { t.GetAffinityMask() } -> Common::ConvertibleTo<u64>;
{t.SetAffinityMask(0)};
- { t.GetAffinity(0) }
- ->std::same_as<bool>;
+ { t.GetAffinity(0) } -> std::same_as<bool>;
{t.SetAffinity(0, false)};
{t.SetAll()};
};
@@ -38,25 +36,20 @@ concept KPriorityQueueMember = !std::is_reference_v<T> && requires(T & t) {
{(typename T::QueueEntry()).Initialize()};
{(typename T::QueueEntry()).SetPrev(std::addressof(t))};
{(typename T::QueueEntry()).SetNext(std::addressof(t))};
- { (typename T::QueueEntry()).GetNext() }
- ->std::same_as<T*>;
- { (typename T::QueueEntry()).GetPrev() }
- ->std::same_as<T*>;
- { t.GetPriorityQueueEntry(0) }
- ->std::same_as<typename T::QueueEntry&>;
+ { (typename T::QueueEntry()).GetNext() } -> std::same_as<T*>;
+ { (typename T::QueueEntry()).GetPrev() } -> std::same_as<T*>;
+ { t.GetPriorityQueueEntry(0) } -> std::same_as<typename T::QueueEntry&>;
{t.GetAffinityMask()};
- { std::remove_cvref_t<decltype(t.GetAffinityMask())>() }
- ->KPriorityQueueAffinityMask;
+ { std::remove_cvref_t<decltype(t.GetAffinityMask())>() } -> KPriorityQueueAffinityMask;
- { t.GetActiveCore() }
- ->Common::ConvertibleTo<s32>;
- { t.GetPriority() }
- ->Common::ConvertibleTo<s32>;
+ { t.GetActiveCore() } -> Common::ConvertibleTo<s32>;
+ { t.GetPriority() } -> Common::ConvertibleTo<s32>;
};
template <typename Member, size_t NumCores_, int LowestPriority, int HighestPriority>
-requires KPriorityQueueMember<Member> class KPriorityQueue {
+requires KPriorityQueueMember<Member>
+class KPriorityQueue {
public:
using AffinityMaskType = std::remove_cv_t<
std::remove_reference_t<decltype(std::declval<Member>().GetAffinityMask())>>;
diff --git a/src/core/hle/kernel/k_scheduler.h b/src/core/hle/kernel/k_scheduler.h
index 12cfae919..c8ccc1ae4 100644
--- a/src/core/hle/kernel/k_scheduler.h
+++ b/src/core/hle/kernel/k_scheduler.h
@@ -197,7 +197,7 @@ private:
class [[nodiscard]] KScopedSchedulerLock : KScopedLock<GlobalSchedulerContext::LockType> {
public:
- explicit KScopedSchedulerLock(KernelCore & kernel);
+ explicit KScopedSchedulerLock(KernelCore& kernel);
~KScopedSchedulerLock();
};
diff --git a/src/core/hle/kernel/k_scoped_lock.h b/src/core/hle/kernel/k_scoped_lock.h
index 72c3b0252..4fb180fc6 100644
--- a/src/core/hle/kernel/k_scoped_lock.h
+++ b/src/core/hle/kernel/k_scoped_lock.h
@@ -13,19 +13,18 @@ namespace Kernel {
template <typename T>
concept KLockable = !std::is_reference_v<T> && requires(T & t) {
- { t.Lock() }
- ->std::same_as<void>;
- { t.Unlock() }
- ->std::same_as<void>;
+ { t.Lock() } -> std::same_as<void>;
+ { t.Unlock() } -> std::same_as<void>;
};
template <typename T>
-requires KLockable<T> class [[nodiscard]] KScopedLock {
+requires KLockable<T>
+class [[nodiscard]] KScopedLock {
public:
- explicit KScopedLock(T * l) : lock_ptr(l) {
+ explicit KScopedLock(T* l) : lock_ptr(l) {
this->lock_ptr->Lock();
}
- explicit KScopedLock(T & l) : KScopedLock(std::addressof(l)) {}
+ explicit KScopedLock(T& l) : KScopedLock(std::addressof(l)) {}
~KScopedLock() {
this->lock_ptr->Unlock();
@@ -34,7 +33,7 @@ public:
KScopedLock(const KScopedLock&) = delete;
KScopedLock& operator=(const KScopedLock&) = delete;
- KScopedLock(KScopedLock &&) = delete;
+ KScopedLock(KScopedLock&&) = delete;
KScopedLock& operator=(KScopedLock&&) = delete;
private:
diff --git a/src/core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h b/src/core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h
index a86af56dd..f6c75f2d9 100644
--- a/src/core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h
+++ b/src/core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h
@@ -17,7 +17,7 @@ namespace Kernel {
class [[nodiscard]] KScopedSchedulerLockAndSleep {
public:
- explicit KScopedSchedulerLockAndSleep(KernelCore & kernel_, KThread * t, s64 timeout)
+ explicit KScopedSchedulerLockAndSleep(KernelCore& kernel_, KThread* t, s64 timeout)
: kernel(kernel_), thread(t), timeout_tick(timeout) {
// Lock the scheduler.
kernel.GlobalSchedulerContext().scheduler_lock.Lock();