mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-02 15:49:48 -04:00
kern: use KLightLock for KCoreBarrierInterruptHandler
This commit is contained in:
parent
69cc653e7f
commit
f646d9c8f9
1 changed files with 2 additions and 5 deletions
|
@ -112,7 +112,7 @@ namespace ams::kern::arch::arm64::cpu {
|
||||||
class KCoreBarrierInterruptHandler : public KInterruptHandler {
|
class KCoreBarrierInterruptHandler : public KInterruptHandler {
|
||||||
private:
|
private:
|
||||||
util::Atomic<u64> m_target_cores;
|
util::Atomic<u64> m_target_cores;
|
||||||
KSpinLock m_lock;
|
KLightLock m_lock;
|
||||||
public:
|
public:
|
||||||
constexpr KCoreBarrierInterruptHandler() : KInterruptHandler(), m_target_cores(0), m_lock() { /* ... */ }
|
constexpr KCoreBarrierInterruptHandler() : KInterruptHandler(), m_target_cores(0), m_lock() { /* ... */ }
|
||||||
|
|
||||||
|
@ -123,11 +123,8 @@ namespace ams::kern::arch::arm64::cpu {
|
||||||
}
|
}
|
||||||
|
|
||||||
void SynchronizeCores(u64 core_mask) {
|
void SynchronizeCores(u64 core_mask) {
|
||||||
/* Disable dispatch while we synchronize. */
|
|
||||||
KScopedDisableDispatch dd;
|
|
||||||
|
|
||||||
/* Acquire exclusive access to ourselves. */
|
/* Acquire exclusive access to ourselves. */
|
||||||
KScopedSpinLock lk(m_lock);
|
KScopedLightLock lk(m_lock);
|
||||||
|
|
||||||
/* If necessary, force synchronization with other cores. */
|
/* If necessary, force synchronization with other cores. */
|
||||||
if (const u64 other_cores_mask = core_mask & ~(1ul << GetCurrentCoreId()); other_cores_mask != 0) {
|
if (const u64 other_cores_mask = core_mask & ~(1ul << GetCurrentCoreId()); other_cores_mask != 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue