Use mutex_lock to access g_dp_event_thread_id