At this point the threads are really processes...
This commit is contained in:
22
src/kernel/include/process.h
Normal file
22
src/kernel/include/process.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
#include <queue.h>
|
||||
#include <scheduler.h>
|
||||
#include <stdint.h>
|
||||
|
||||
struct process
|
||||
{
|
||||
uint64_t pid;
|
||||
void *stack_ptr;
|
||||
uint64_t state;
|
||||
uint64_t P4;
|
||||
QUEUE_SPOT(runQ);
|
||||
uint8_t stack[];
|
||||
};
|
||||
|
||||
struct process *process();
|
||||
|
||||
struct process *new_process(void (*function)(void));
|
||||
void yield();
|
||||
void start_scheduler();
|
||||
|
||||
void switch_stack(void *old_ptr, void *new_ptr);
|
||||
Reference in New Issue
Block a user