mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-12 22:17:11 -04:00
Clean
This commit is contained in:
parent
86771ec0f0
commit
01ca17a9f8
@ -16,6 +16,12 @@
|
|||||||
|
|
||||||
namespace scheduler {
|
namespace scheduler {
|
||||||
|
|
||||||
|
constexpr const size_t MAX_PRIORITY = 2;
|
||||||
|
constexpr const size_t MIN_PRIORITY = 0;
|
||||||
|
constexpr const size_t PRIORITY_LEVELS = MAX_PRIORITY - MIN_PRIORITY + 1;
|
||||||
|
|
||||||
|
typedef size_t pid_t;
|
||||||
|
|
||||||
enum class process_state : char {
|
enum class process_state : char {
|
||||||
EMPTY = 0,
|
EMPTY = 0,
|
||||||
NEW = 1,
|
NEW = 1,
|
||||||
@ -30,7 +36,7 @@ struct segment_t {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct process_t {
|
struct process_t {
|
||||||
size_t pid;
|
pid_t pid;
|
||||||
|
|
||||||
bool system;
|
bool system;
|
||||||
|
|
||||||
|
@ -13,8 +13,6 @@
|
|||||||
|
|
||||||
namespace scheduler {
|
namespace scheduler {
|
||||||
|
|
||||||
typedef size_t pid_t;
|
|
||||||
|
|
||||||
constexpr const size_t MAX_PROCESS = 128;
|
constexpr const size_t MAX_PROCESS = 128;
|
||||||
|
|
||||||
pid_t get_pid();
|
pid_t get_pid();
|
||||||
|
@ -139,7 +139,7 @@ void keyboard::get_char_blocking(){
|
|||||||
start = (start + 1) % BUFFER_SIZE;
|
start = (start + 1) % BUFFER_SIZE;
|
||||||
--count;
|
--count;
|
||||||
|
|
||||||
auto pid = scheduler::current_pid();
|
auto pid = scheduler::get_pid();
|
||||||
|
|
||||||
//TODO Give key to process pid
|
//TODO Give key to process pid
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user