From ac32b2e77e185880dbf3695c1c74af30a206bbc3 Mon Sep 17 00:00:00 2001 From: Sourabh Betigeri Date: Mon, 13 Jan 2025 15:21:28 -0800 Subject: [PATCH] SWDEV-507104 - Removes alignment requirement for Semaphore class to resolve runtime misaligned memory issues Change-Id: I1be3eb6e9fdcf12e995c8fe8ee30592c94f7f97a [ROCm/clr commit: e4ba0b6262454907362d7f29dc28416138d06173] --- projects/clr/rocclr/thread/semaphore.hpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/projects/clr/rocclr/thread/semaphore.hpp b/projects/clr/rocclr/thread/semaphore.hpp index f2fa81e1f5..0615af0f83 100644 --- a/projects/clr/rocclr/thread/semaphore.hpp +++ b/projects/clr/rocclr/thread/semaphore.hpp @@ -42,7 +42,7 @@ namespace amd { class Thread; //! \brief Counting semaphore -class alignas(64) Semaphore : public HeapObject { +class Semaphore : public HeapObject { private: std::atomic_int state_; //!< This semaphore's value. @@ -67,9 +67,6 @@ public: void reset() { state_.store(0, std::memory_order_release); } }; -static_assert(sizeof(Semaphore) == 64 , - "unexpected total size of Semaphore"); - /*! @} * @} */