Remove xenia-cpu dependency on xenia-kernel
This commit is contained in:
29
src/xenia/cpu/thread.cc
Normal file
29
src/xenia/cpu/thread.cc
Normal file
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2017 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include "xenia/cpu/thread.h"
|
||||
#include "xenia/cpu/thread_state.h"
|
||||
|
||||
namespace xe {
|
||||
namespace cpu {
|
||||
|
||||
thread_local Thread* Thread::current_thread_tls_ = nullptr;
|
||||
|
||||
Thread::Thread() {}
|
||||
Thread::~Thread() {}
|
||||
|
||||
bool Thread::IsInThread() { return current_thread_tls_ != nullptr; }
|
||||
|
||||
Thread* Thread::GetCurrentThread() { return current_thread_tls_; }
|
||||
uint32_t Thread::GetCurrentThreadId() {
|
||||
return Thread::GetCurrentThread()->thread_state()->thread_id();
|
||||
}
|
||||
|
||||
} // namespace cpu
|
||||
} // namespace xe
|
||||
Reference in New Issue
Block a user