Adding thread handle to logging.

This commit is contained in:
Ben Vanik
2015-08-29 20:49:17 -07:00
parent c486fcfcba
commit a86b3821f2
11 changed files with 113 additions and 49 deletions

View File

@@ -0,0 +1,25 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2015 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include "xenia/base/threading.h"
namespace xe {
namespace threading {
thread_local uint32_t current_thread_id_ = UINT_MAX;
uint32_t current_thread_id() {
return current_thread_id_ == UINT_MAX ? current_thread_system_id()
: current_thread_id_;
}
void set_current_thread_id(uint32_t id) { current_thread_id_ = id; }
} // namespace threading
} // namespace xe