diff options
author | kwolekr <kwolekr@minetest.net> | 2015-10-16 21:12:30 -0400 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2015-10-16 22:20:24 -0400 |
commit | 6be74d17df75714066b36cfa6ae40081526ef477 (patch) | |
tree | 13bf9b742aff873d3e618a610973812c4545945c /src/itemdef.cpp | |
parent | 836486a98e7b09e25b97c9d989301ed9eb365b3b (diff) | |
download | minetest-6be74d17df75714066b36cfa6ae40081526ef477.tar.gz minetest-6be74d17df75714066b36cfa6ae40081526ef477.tar.bz2 minetest-6be74d17df75714066b36cfa6ae40081526ef477.zip |
Refactor thread utility interface
- Add "thr_" prefix to thread utility functions
- Compare threadid_ts in a portable manner, where possible
Diffstat (limited to 'src/itemdef.cpp')
-rw-r--r-- | src/itemdef.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/itemdef.cpp b/src/itemdef.cpp index 08ff887b2..2971d4e88 100644 --- a/src/itemdef.cpp +++ b/src/itemdef.cpp @@ -241,7 +241,7 @@ public: { #ifndef SERVER - m_main_thread = get_current_thread_id(); + m_main_thread = thr_get_current_thread_id(); #endif clear(); } @@ -317,7 +317,7 @@ public: <<name<<"\""<<std::endl; // This is not thread-safe - sanity_check(get_current_thread_id() == m_main_thread); + sanity_check(thr_is_current_thread(m_main_thread)); // Skip if already in cache ClientCached *cc = NULL; @@ -448,7 +448,7 @@ public: if(cc) return cc; - if(get_current_thread_id() == m_main_thread) + if(thr_is_current_thread(m_main_thread)) { return createClientCachedDirect(name, gamedef); } |