mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-11-15 09:36:35 +00:00
kern: KConditionVariable arbiter functions now static
This commit is contained in:
parent
53aa04303a
commit
fe03791d11
3 changed files with 4 additions and 12 deletions
|
@ -29,8 +29,8 @@ namespace ams::kern {
|
||||||
constexpr KConditionVariable() : m_tree() { /* ... */ }
|
constexpr KConditionVariable() : m_tree() { /* ... */ }
|
||||||
|
|
||||||
/* Arbitration. */
|
/* Arbitration. */
|
||||||
Result SignalToAddress(KProcessAddress addr);
|
static Result SignalToAddress(KProcessAddress addr);
|
||||||
Result WaitForAddress(ams::svc::Handle handle, KProcessAddress addr, u32 value);
|
static Result WaitForAddress(ams::svc::Handle handle, KProcessAddress addr, u32 value);
|
||||||
|
|
||||||
/* Condition variable. */
|
/* Condition variable. */
|
||||||
void Signal(uintptr_t cv_key, s32 count);
|
void Signal(uintptr_t cv_key, s32 count);
|
||||||
|
|
|
@ -341,14 +341,6 @@ namespace ams::kern {
|
||||||
void UnpinCurrentThread();
|
void UnpinCurrentThread();
|
||||||
void UnpinThread(KThread *thread);
|
void UnpinThread(KThread *thread);
|
||||||
|
|
||||||
Result SignalToAddress(KProcessAddress address) {
|
|
||||||
return m_cond_var.SignalToAddress(address);
|
|
||||||
}
|
|
||||||
|
|
||||||
Result WaitForAddress(ams::svc::Handle handle, KProcessAddress address, u32 tag) {
|
|
||||||
return m_cond_var.WaitForAddress(handle, address, tag);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SignalConditionVariable(uintptr_t cv_key, int32_t count) {
|
void SignalConditionVariable(uintptr_t cv_key, int32_t count) {
|
||||||
return m_cond_var.Signal(cv_key, count);
|
return m_cond_var.Signal(cv_key, count);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ namespace ams::kern::svc {
|
||||||
R_UNLESS(!IsKernelAddress(address), svc::ResultInvalidCurrentMemory());
|
R_UNLESS(!IsKernelAddress(address), svc::ResultInvalidCurrentMemory());
|
||||||
R_UNLESS(util::IsAligned(address, sizeof(u32)), svc::ResultInvalidAddress());
|
R_UNLESS(util::IsAligned(address, sizeof(u32)), svc::ResultInvalidAddress());
|
||||||
|
|
||||||
return GetCurrentProcess().WaitForAddress(thread_handle, address, tag);
|
return KConditionVariable::WaitForAddress(thread_handle, address, tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result ArbitrateUnlock(uintptr_t address) {
|
Result ArbitrateUnlock(uintptr_t address) {
|
||||||
|
@ -38,7 +38,7 @@ namespace ams::kern::svc {
|
||||||
R_UNLESS(!IsKernelAddress(address), svc::ResultInvalidCurrentMemory());
|
R_UNLESS(!IsKernelAddress(address), svc::ResultInvalidCurrentMemory());
|
||||||
R_UNLESS(util::IsAligned(address, sizeof(u32)), svc::ResultInvalidAddress());
|
R_UNLESS(util::IsAligned(address, sizeof(u32)), svc::ResultInvalidAddress());
|
||||||
|
|
||||||
return GetCurrentProcess().SignalToAddress(address);
|
return KConditionVariable::SignalToAddress(address);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue