eapol/eapol_framework/eapol_common/am/common/eap_am_tools.cpp
changeset 49 43351a4f2da3
parent 26 9abfd4f00d37
equal deleted inserted replaced
47:712b4ffd76bb 49:43351a4f2da3
   443 	#define EAP_TRACE_TIMER(object, flags, parameters)
   443 	#define EAP_TRACE_TIMER(object, flags, parameters)
   444 #endif //#if defined(USE_EAP_TIMER_QUEUE_TRACE)
   444 #endif //#if defined(USE_EAP_TIMER_QUEUE_TRACE)
   445 
   445 
   446 EAP_FUNC_EXPORT eap_status_e eap_am_tools_c::timer_thread_function()
   446 EAP_FUNC_EXPORT eap_status_e eap_am_tools_c::timer_thread_function()
   447 {
   447 {
   448 	EAP_TRACE_TIMER(this, TRACE_FLAGS_TIMER, (EAPL("TIMER: Timer thread starts.\n")));
   448 	EAP_TRACE_DEBUG(this, TRACE_FLAGS_ALWAYS, (EAPL("TIMER: Timer thread starts.\n")));
   449 
   449 
   450 	u32_t static_sleep_time = get_timer_resolution_ms();
   450 	u32_t static_sleep_time = get_timer_resolution_ms();
   451 	u64_t start_time = get_clock_ticks();
   451 	u64_t start_time = get_clock_ticks();
   452 	u64_t current_time = start_time;
   452 	u64_t current_time = start_time;
   453 	u64_t virtual_time = 0u;
   453 	u64_t virtual_time = 0u;
   633 		TRACE_FLAGS_TIMER,
   633 		TRACE_FLAGS_TIMER,
   634 		(EAPL("MUTEX: eap_am_tools_c::timer_thread_function(): mutex_leave(): end\n")));
   634 		(EAPL("MUTEX: eap_am_tools_c::timer_thread_function(): mutex_leave(): end\n")));
   635 
   635 
   636 	delete mutex;
   636 	delete mutex;
   637 
   637 
   638 	EAP_TRACE_TIMER(this, TRACE_FLAGS_TIMER, (EAPL("TIMER: Timer thread stops.\n")));
   638 	EAP_TRACE_DEBUG(this, TRACE_FLAGS_ALWAYS, (EAPL("TIMER: Timer thread stops.\n")));
   639 
   639 
   640 	m_thread_stopped =true;
   640 	m_thread_stopped =true;
   641 
   641 
   642 	return eap_status_ok; 
   642 	return eap_status_ok; 
   643 }
   643 }
  1648 	eap_status_e status = eap_status_ok;
  1648 	eap_status_e status = eap_status_ok;
  1649 
  1649 
  1650 	EAP_TRACE_DEBUG(
  1650 	EAP_TRACE_DEBUG(
  1651 		this,
  1651 		this,
  1652 		TRACE_FLAGS_DEFAULT,
  1652 		TRACE_FLAGS_DEFAULT,
  1653 		(EAPL("eap_am_tools_c::shutdown_am_tools(); this = 0x%08x\n"),
  1653 		(EAPL("eap_am_tools_c::shutdown_am_tools(): this = 0x%08x\n"),
  1654 		 this));
  1654 		 this));
  1655 
  1655 
  1656 	if (m_shutdown_was_called == false)
  1656 	if (m_shutdown_was_called == false)
  1657 	{
  1657 	{
  1658 		m_shutdown_was_called = true;
  1658 		m_shutdown_was_called = true;