summaryrefslogtreecommitdiff
path: root/sys/include
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-07-17 00:24:32 -0400
committerIan Moffett <ian@osmora.org>2024-07-17 00:24:32 -0400
commit2be1c778a4dfe2c6ebb371b457c1e1dc9e89c98d (patch)
tree2dbf33a0a4d774b6b9694dc45f876c7d1ce87d35 /sys/include
parentb1e73a96d935260f913410d66f77a52c4daf3f48 (diff)
kernel: exec: Save program state within thread
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include')
-rw-r--r--sys/include/sys/exec.h4
-rw-r--r--sys/include/sys/proc.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/sys/include/sys/exec.h b/sys/include/sys/exec.h
index 810e89e..2c85010 100644
--- a/sys/include/sys/exec.h
+++ b/sys/include/sys/exec.h
@@ -30,7 +30,7 @@
#ifndef _SYS_EXEC_H_
#define _SYS_EXEC_H_
-#include <sys/proc.h>
+#include <sys/types.h>
#if defined(_KERNEL)
@@ -52,6 +52,8 @@
STACK_PUSH(PTR, VAL); \
STACK_PUSH(PTR, TAG);
+struct proc;
+
struct exec_range {
paddr_t start;
paddr_t end;
diff --git a/sys/include/sys/proc.h b/sys/include/sys/proc.h
index ab13536..cf76e80 100644
--- a/sys/include/sys/proc.h
+++ b/sys/include/sys/proc.h
@@ -36,6 +36,7 @@
#include <sys/param.h>
#include <sys/cdefs.h>
#include <sys/syscall.h>
+#include <sys/exec.h>
#if defined(_KERNEL)
#include <machine/frame.h>
#include <machine/pcb.h>
@@ -46,10 +47,9 @@
#define PROC_STACK_PAGES 8
#define PROC_STACK_SIZE (PROC_STACK_PAGES * DEFAULT_PAGESIZE)
-struct exec_prog;
-
struct proc {
pid_t pid;
+ struct exec_prog exec;
struct trapframe tf;
struct pcb pcb;
size_t priority;