From d87023bb37bd785b96c67bdf20dc76d622f834fb Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Wed, 24 Jan 2018 11:17:34 +0000 Subject: [PATCH] rm boost::mutex from s1ap_nas_transport --- srsepc/src/mme/s1ap_nas_transport.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/srsepc/src/mme/s1ap_nas_transport.cc b/srsepc/src/mme/s1ap_nas_transport.cc index e5bf2890a..0054041fe 100644 --- a/srsepc/src/mme/s1ap_nas_transport.cc +++ b/srsepc/src/mme/s1ap_nas_transport.cc @@ -31,7 +31,7 @@ namespace srsepc{ s1ap_nas_transport* s1ap_nas_transport::m_instance = NULL; -boost::mutex s1ap_nas_transport_instance_mutex; +pthread_mutex_t s1ap_nas_transport_instance_mutex = PTHREAD_MUTEX_INITIALIZER; s1ap_nas_transport::s1ap_nas_transport() { @@ -46,21 +46,23 @@ s1ap_nas_transport::~s1ap_nas_transport() s1ap_nas_transport* s1ap_nas_transport::get_instance(void) { - boost::mutex::scoped_lock lock(s1ap_nas_transport_instance_mutex); + pthread_mutex_lock(&s1ap_nas_transport_instance_mutex); if(NULL == m_instance) { m_instance = new s1ap_nas_transport(); } + pthread_mutex_unlock(&s1ap_nas_transport_instance_mutex); return(m_instance); } void s1ap_nas_transport::cleanup(void) { - boost::mutex::scoped_lock lock(s1ap_nas_transport_instance_mutex); + pthread_mutex_lock(&s1ap_nas_transport_instance_mutex); if(NULL != m_instance) { delete m_instance; m_instance = NULL; } + pthread_mutex_unlock(&s1ap_nas_transport_instance_mutex); } void