diff --git a/srsue/hdr/stack/upper/nas_5gmm_state.h b/srsue/hdr/stack/upper/nas_5gmm_state.h index 29fb2a983..28c5efdbd 100644 --- a/srsue/hdr/stack/upper/nas_5gmm_state.h +++ b/srsue/hdr/stack/upper/nas_5gmm_state.h @@ -75,8 +75,8 @@ public: private: std::atomic state{state_t::null}; - deregistered_substate_t deregistered_substate = deregistered_substate_t::null; - registered_substate_t registered_substate = registered_substate_t::null; + std::atomic deregistered_substate{deregistered_substate_t::null}; + std::atomic registered_substate{registered_substate_t::null}; srslog::basic_logger& logger = srslog::fetch_basic_logger("NAS-5G"); }; @@ -85,4 +85,5 @@ const char* mm5g_deregistered_substate_text(mm5g_state_t::deregistered_substate_ const char* mm5g_registered_substate_text(mm5g_state_t::registered_substate_t type); } // namespace srsue + #endif diff --git a/srsue/hdr/stack/upper/nas_emm_state.h b/srsue/hdr/stack/upper/nas_emm_state.h index de53e538f..e541d10d2 100644 --- a/srsue/hdr/stack/upper/nas_emm_state.h +++ b/srsue/hdr/stack/upper/nas_emm_state.h @@ -77,10 +77,10 @@ public: const std::string get_full_state_text(); private: - std::atomic state{state_t::null}; // The GW might require to know the NAS state from another thread - deregistered_substate_t deregistered_substate = deregistered_substate_t::null; - registered_substate_t registered_substate = registered_substate_t::null; - srslog::basic_logger& logger = srslog::fetch_basic_logger("NAS"); + std::atomic state{state_t::null}; // The GW might require to know the NAS state from another thread + std::atomic deregistered_substate{deregistered_substate_t::null}; + std::atomic registered_substate{registered_substate_t::null}; + srslog::basic_logger& logger = srslog::fetch_basic_logger("NAS"); }; const char* emm_state_text(emm_state_t::state_t type); @@ -88,4 +88,5 @@ const char* emm_deregistered_substate_text(emm_state_t::deregistered_substate_t const char* emm_registered_substate_text(emm_state_t::registered_substate_t type); } // namespace srsue + #endif