mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-05 01:03:43 -04:00
ams: replace most remaining operator & with std::addressof
This commit is contained in:
parent
ce8aacef21
commit
1ab0bd1765
109 changed files with 587 additions and 586 deletions
|
@ -70,7 +70,7 @@ namespace ams::os::impl {
|
|||
this->current_time = GetCurrentTick().ToTimeSpan();
|
||||
|
||||
TimeSpan min_timeout = 0;
|
||||
MultiWaitHolderBase *min_timeout_object = this->RecalculateNextTimeout(&min_timeout, end_time);
|
||||
MultiWaitHolderBase *min_timeout_object = this->RecalculateNextTimeout(std::addressof(min_timeout), end_time);
|
||||
|
||||
s32 index = WaitInvalid;
|
||||
Result wait_result = ResultSuccess();
|
||||
|
@ -141,11 +141,10 @@ namespace ams::os::impl {
|
|||
|
||||
for (MultiWaitHolderBase &holder_base : this->multi_wait_list) {
|
||||
if (auto handle = holder_base.GetHandle(); handle != os::InvalidNativeHandle) {
|
||||
AMS_ASSERT(count < num);
|
||||
AMS_UNUSED(num);
|
||||
AMS_ABORT_UNLESS(count < num);
|
||||
|
||||
out_handles[count] = handle;
|
||||
out_objects[count] = &holder_base;
|
||||
out_objects[count] = std::addressof(holder_base);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
@ -160,7 +159,7 @@ namespace ams::os::impl {
|
|||
TriBool is_signaled = holder_base.LinkToObjectList();
|
||||
|
||||
if (signaled_holder == nullptr && is_signaled == TriBool::True) {
|
||||
signaled_holder = &holder_base;
|
||||
signaled_holder = std::addressof(holder_base);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -179,7 +178,7 @@ namespace ams::os::impl {
|
|||
|
||||
for (MultiWaitHolderBase &holder_base : this->multi_wait_list) {
|
||||
if (const TimeSpan cur_time = holder_base.GetAbsoluteWakeupTime(); cur_time < min_time) {
|
||||
min_timeout_holder = &holder_base;
|
||||
min_timeout_holder = std::addressof(holder_base);
|
||||
min_time = cur_time;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace ams::os::impl {
|
|||
public:
|
||||
void SignalAllThreads() {
|
||||
for (MultiWaitHolderBase &holder_base : this->object_list) {
|
||||
holder_base.GetMultiWait()->SignalAndWakeupThread(&holder_base);
|
||||
holder_base.GetMultiWait()->SignalAndWakeupThread(std::addressof(holder_base));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
namespace ams::os::impl {
|
||||
|
||||
#define ATOMIC_COMPARE_EXCHANGE_LOCK_COUNT(dst_ref, expected_ref, desired_ref, success, fail) \
|
||||
(__atomic_compare_exchange(reinterpret_cast<u64 *>(&dst_ref), reinterpret_cast<u64 *>(&expected_ref), reinterpret_cast<u64 *>(&desired_ref), true, success, fail))
|
||||
(__atomic_compare_exchange(reinterpret_cast<u64 *>(std::addressof(dst_ref)), reinterpret_cast<u64 *>(std::addressof(expected_ref)), reinterpret_cast<u64 *>(std::addressof(desired_ref)), true, success, fail))
|
||||
|
||||
|
||||
void ReaderWriterLockHorizonImpl::AcquireReadLockWriteLocked(os::ReaderWriterLockType *rw_lock) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue