Adding kernel state pointer to PPCContext. Still needs larger cleanup.
This commit is contained in:
parent
d816d80190
commit
fccab79a7a
|
@ -19,6 +19,9 @@ namespace cpu {
|
|||
class Processor;
|
||||
class ThreadState;
|
||||
} // namespace cpu
|
||||
namespace kernel {
|
||||
class KernelState;
|
||||
} // namespace kernel
|
||||
} // namespace xe
|
||||
|
||||
namespace xe {
|
||||
|
@ -209,6 +212,9 @@ typedef struct alignas(64) PPCContext_s {
|
|||
// current runtime and its data.
|
||||
Processor* processor;
|
||||
|
||||
// Shared kernel state, for easy access from kernel exports.
|
||||
xe::kernel::KernelState* kernel_state;
|
||||
|
||||
uint8_t* physical_membase;
|
||||
|
||||
void SetRegFromString(const char* name, const char* value);
|
||||
|
|
|
@ -205,6 +205,9 @@ X_STATUS XThread::Create() {
|
|||
thread_state_->thread_id(), thread_state_->stack_limit(),
|
||||
thread_state_->stack_base());
|
||||
|
||||
// Exports use this to get the kernel.
|
||||
thread_state_->context()->kernel_state = kernel_state_;
|
||||
|
||||
uint8_t proc_mask =
|
||||
static_cast<uint8_t>(creation_params_.creation_flags >> 24);
|
||||
|
||||
|
|
Loading…
Reference in New Issue