From 6be74d17df75714066b36cfa6ae40081526ef477 Mon Sep 17 00:00:00 2001 From: kwolekr Date: Fri, 16 Oct 2015 21:12:30 -0400 Subject: Refactor thread utility interface - Add "thr_" prefix to thread utility functions - Compare threadid_ts in a portable manner, where possible --- src/client/tile.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/client') diff --git a/src/client/tile.cpp b/src/client/tile.cpp index f918dee29..995526ea8 100644 --- a/src/client/tile.cpp +++ b/src/client/tile.cpp @@ -439,7 +439,7 @@ TextureSource::TextureSource(IrrlichtDevice *device): { assert(m_device); // Pre-condition - m_main_thread = get_current_thread_id(); + m_main_thread = thr_get_current_thread_id(); // Add a NULL TextureInfo as the first index, named "" m_textureinfo_cache.push_back(TextureInfo("")); @@ -502,7 +502,7 @@ u32 TextureSource::getTextureId(const std::string &name) /* Get texture */ - if (get_current_thread_id() == m_main_thread) + if (thr_is_current_thread(m_main_thread)) { return generateTexture(name); } @@ -604,7 +604,7 @@ u32 TextureSource::generateTexture(const std::string &name) /* Calling only allowed from main thread */ - if (get_current_thread_id() != m_main_thread) { + if (!thr_is_current_thread(m_main_thread)) { errorstream<<"TextureSource::generateTexture() " "called not from main thread"<