change boost::mutex to pthread_mutex_t, not available now