acadia/zion/scheduler/thread.h
Drew Galbraith 960cbf9519 Add Scheduler wireframe.
Right now does nothing but has containing classes for process and thread
information.
2023-05-18 12:43:53 -07:00

23 lines
414 B
C++

#pragma once
#include <stdint.h>
// Forward decl due to cyclic dependency.
class Process;
class Thread {
public:
Thread(Process* proc, uint64_t thread_id) : process_(proc), id_(thread_id) {}
uint64_t tid() { return id_; };
uint64_t pid();
Process& process() { return *process_; }
private:
Process* process_;
uint64_t id_;
// Next task in queue for quick scheduling.
Thread* next_task_;
};