Allocating stacks in the right place.
This commit is contained in:
@@ -19,15 +19,22 @@ namespace cpu {
|
||||
|
||||
class Processor;
|
||||
|
||||
enum class ThreadStackType {
|
||||
kKernelStack,
|
||||
kUserStack,
|
||||
};
|
||||
|
||||
class ThreadState {
|
||||
public:
|
||||
ThreadState(Processor* processor, uint32_t thread_id, uint32_t stack_address,
|
||||
ThreadState(Processor* processor, uint32_t thread_id,
|
||||
ThreadStackType stack_type, uint32_t stack_address,
|
||||
uint32_t stack_size, uint32_t pcr_address);
|
||||
~ThreadState();
|
||||
|
||||
Processor* processor() const { return processor_; }
|
||||
Memory* memory() const { return memory_; }
|
||||
uint32_t thread_id() const { return thread_id_; }
|
||||
ThreadStackType stack_type() const { return stack_type_; }
|
||||
const std::string& name() const { return name_; }
|
||||
void set_name(const std::string& value) { name_ = value; }
|
||||
void* backend_data() const { return backend_data_; }
|
||||
@@ -50,6 +57,7 @@ class ThreadState {
|
||||
Processor* processor_;
|
||||
Memory* memory_;
|
||||
uint32_t thread_id_;
|
||||
ThreadStackType stack_type_;
|
||||
std::string name_;
|
||||
void* backend_data_;
|
||||
uint32_t stack_address_;
|
||||
|
||||
Reference in New Issue
Block a user