CItemDefManager() { #ifndef SERVER m_main_thread = thr_get_current_thread_id(); #endif clear(); }
const std::string Logger::getThreadName() { std::map<threadid_t, std::string>::const_iterator it; threadid_t id = thr_get_current_thread_id(); it = m_thread_names.find(id); if (it != m_thread_names.end()) return it->second; std::ostringstream os; os << "#0x" << std::hex << id; return os.str(); }
ShaderSource::ShaderSource(IrrlichtDevice *device): m_device(device) { assert(m_device); // Pre-condition m_main_thread = thr_get_current_thread_id(); // Add a dummy ShaderInfo as the first index, named "" m_shaderinfo_cache.push_back(ShaderInfo()); // Add main global constant setter addShaderConstantSetterFactory(new MainShaderConstantSetterFactory()); }
void Logger::deregisterThread() { threadid_t id = thr_get_current_thread_id(); MutexAutoLock lock(m_mutex); m_thread_names.erase(id); }
void Logger::registerThread(const std::string &name) { threadid_t id = thr_get_current_thread_id(); MutexAutoLock lock(m_mutex); m_thread_names[id] = name; }