At this point the threads are really processes...

This commit is contained in:
2018-02-20 20:46:24 +01:00
parent 6523b10984
commit e868b83f50
6 changed files with 93 additions and 93 deletions

View File

@@ -3,9 +3,9 @@
#include <scheduler.h>
#include <stdint.h>
struct thread
struct process
{
uint64_t tid;
uint64_t pid;
void *stack_ptr;
uint64_t state;
uint64_t P4;
@@ -13,9 +13,9 @@ struct thread
uint8_t stack[];
};
struct thread *thread();
struct process *process();
struct thread *new_thread(void (*function)(void));
struct process *new_process(void (*function)(void));
void yield();
void start_scheduler();

View File

@@ -1,8 +1,8 @@
#pragma once
#include <queue.h>
#define runQ readyQ, readyQ_next, struct thread
#define runQ readyQ, readyQ_next, struct process
QUEUE_DECLARE(runQ);
void ready(struct thread *th);
struct thread *scheduler_next();
void ready(struct process *proc);
struct process *scheduler_next();