diff --git a/include/crucible/lockset.h b/include/crucible/lockset.h index 856c55e..99500b7 100644 --- a/include/crucible/lockset.h +++ b/include/crucible/lockset.h @@ -117,7 +117,7 @@ namespace crucible { while (full() || locked(name)) { m_condvar.wait(lock); } - auto rv = m_set.insert(make_pair(name, gettid())); + auto rv = m_set.insert(make_pair(name, crucible::gettid())); THROW_CHECK0(runtime_error, rv.second); } @@ -129,7 +129,7 @@ namespace crucible { if (full() || locked(name)) { return false; } - auto rv = m_set.insert(make_pair(name, gettid())); + auto rv = m_set.insert(make_pair(name, crucible::gettid())); THROW_CHECK1(runtime_error, name, rv.second); return true; } diff --git a/lib/chatter.cc b/lib/chatter.cc index cbd5adb..e5a24f9 100644 --- a/lib/chatter.cc +++ b/lib/chatter.cc @@ -69,14 +69,14 @@ namespace crucible { DIE_IF_ZERO(strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", <m)); header_stream << buf; - header_stream << " " << getpid() << "." << gettid() << "<" << m_loglevel << ">"; + header_stream << " " << getpid() << "." << crucible::gettid() << "<" << m_loglevel << ">"; if (!m_name.empty()) { header_stream << " " << m_name; } } else { header_stream << "<" << m_loglevel << ">"; header_stream << (m_name.empty() ? "thread" : m_name); - header_stream << "[" << gettid() << "]"; + header_stream << "[" << crucible::gettid() << "]"; } header_stream << ": "; diff --git a/src/bees.cc b/src/bees.cc index 3d814cb..79d7dc6 100644 --- a/src/bees.cc +++ b/src/bees.cc @@ -142,9 +142,9 @@ BeesNote::~BeesNote() tl_next = m_prev; unique_lock lock(s_mutex); if (tl_next) { - s_status[gettid()] = tl_next; + s_status[crucible::gettid()] = tl_next; } else { - s_status.erase(gettid()); + s_status.erase(crucible::gettid()); } } @@ -155,7 +155,7 @@ BeesNote::BeesNote(function f) : m_prev = tl_next; tl_next = this; unique_lock lock(s_mutex); - s_status[gettid()] = tl_next; + s_status[crucible::gettid()] = tl_next; } void