rm boost::mutex from s1ap_mngmnt_proc

master
Pedro Alvarez 7 years ago
parent d87023bb37
commit 360bb5e2d6

@ -32,7 +32,7 @@
namespace srsepc{ namespace srsepc{
s1ap_mngmt_proc* s1ap_mngmt_proc::m_instance = NULL; s1ap_mngmt_proc* s1ap_mngmt_proc::m_instance = NULL;
boost::mutex s1ap_mngmt_proc_instance_mutex; pthread_mutex_t s1ap_mngmt_proc_instance_mutex = PTHREAD_MUTEX_INITIALIZER;
s1ap_mngmt_proc::s1ap_mngmt_proc() s1ap_mngmt_proc::s1ap_mngmt_proc()
@ -46,21 +46,23 @@ s1ap_mngmt_proc::~s1ap_mngmt_proc()
s1ap_mngmt_proc* s1ap_mngmt_proc*
s1ap_mngmt_proc::get_instance(void) s1ap_mngmt_proc::get_instance(void)
{ {
boost::mutex::scoped_lock lock(s1ap_mngmt_proc_instance_mutex); pthread_mutex_lock(&s1ap_mngmt_proc_instance_mutex);
if(NULL == m_instance) { if(NULL == m_instance) {
m_instance = new s1ap_mngmt_proc(); m_instance = new s1ap_mngmt_proc();
} }
return(m_instance); return(m_instance);
pthread_mutex_unlock(&s1ap_mngmt_proc_instance_mutex);
} }
void void
s1ap_mngmt_proc::cleanup(void) s1ap_mngmt_proc::cleanup(void)
{ {
boost::mutex::scoped_lock lock(s1ap_mngmt_proc_instance_mutex); pthread_mutex_lock(&s1ap_mngmt_proc_instance_mutex);
if(NULL != m_instance) { if(NULL != m_instance) {
delete m_instance; delete m_instance;
m_instance = NULL; m_instance = NULL;
} }
pthread_mutex_unlock(&s1ap_mngmt_proc_instance_mutex);
} }
void void

Loading…
Cancel
Save