ams: support building unit test programs on windows/linux/macos

This commit is contained in:
Michael Scire authored and SciresM committed 2022-03-21 17:21:44 -07:00
1 parent 9a38be201a
commit 64a97576d0
756 files changed
+33359 -9372

No files matched your search

@@ -25,7 +25,9 @@ namespace ams::os {
ALWAYS_INLINE u64 GetBarrierBaseCounterImpl(const BarrierType *barrier) {
/* Check pre-conditions. */
#if defined(AMS_OS_INTERNAL_CRITICAL_SECTION_IMPL_CAN_CHECK_LOCKED_BY_CURRENT_THREAD)
AMS_ASSERT(util::GetReference(barrier->cs_barrier).IsLockedByCurrentThread());
#endif
/* Convert two u32s to u64. */
return (static_cast<u64>(barrier->base_counter_lower) << 0) | (static_cast<u64>(barrier->base_counter_upper) << BITSIZEOF(barrier->base_counter_lower));
@@ -33,7 +35,9 @@ namespace ams::os {
ALWAYS_INLINE void SetBarrierBaseCounterImpl(BarrierType *barrier, u64 value) {
/* Check pre-conditions. */
#if defined(AMS_OS_INTERNAL_CRITICAL_SECTION_IMPL_CAN_CHECK_LOCKED_BY_CURRENT_THREAD)
AMS_ASSERT(util::GetReference(barrier->cs_barrier).IsLockedByCurrentThread());
#endif
/* Store as two u32s. */
barrier->base_counter_lower = static_cast<u32>(value >> 0);