At this point the threads are really processes...

This commit is contained in:
thomas committed 2018-03-29 19:36:32 +02:00
1 parent 6523b10984
commit e868b83f50
6 files changed
+93 -93

No files matched your search

@@ -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();
+3 -3
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();