summaryrefslogtreecommitdiff
path: root/proc.h
diff options
context:
space:
mode:
authorrsc <rsc>2006-09-06 17:50:20 +0000
committerrsc <rsc>2006-09-06 17:50:20 +0000
commitf552738889f56586728d1b5d2a63cde0cf124929 (patch)
treee91c4b41699f12d686383556fbbe67baa41d9575 /proc.h
parent9e9bcaf143bf8507e947f9934371744c3d50a8ea (diff)
downloadxv6-labs-f552738889f56586728d1b5d2a63cde0cf124929.tar.gz
xv6-labs-f552738889f56586728d1b5d2a63cde0cf124929.tar.bz2
xv6-labs-f552738889f56586728d1b5d2a63cde0cf124929.zip
no /* */ comments
Diffstat (limited to 'proc.h')
-rw-r--r--proc.h21
1 files changed, 8 insertions, 13 deletions
diff --git a/proc.h b/proc.h
index 419eaba..e3f8cc2 100644
--- a/proc.h
+++ b/proc.h
@@ -1,20 +1,10 @@
-/*
- * p->mem:
- * text
- * original data and bss
- * fixed-size stack
- * expandable heap
- */
-
-/*
- * segments in proc->gdt
- */
+// segments in proc->gdt
#define SEG_KCODE 1 // kernel code
#define SEG_KDATA 2 // kernel data+stack
#define SEG_UCODE 3
#define SEG_UDATA 4
-#define SEG_TSS 5 // this process's task state
-#define NSEGS 6
+#define SEG_TSS 5 // this process's task state
+#define NSEGS 6
struct jmpbuf {
// saved registers for kernel context switches
@@ -37,6 +27,11 @@ enum proc_state { UNUSED, EMBRYO, SLEEPING, RUNNABLE, RUNNING, ZOMBIE };
struct proc{
char *mem; // start of process's memory (a kernel address)
+ // process memory is laid out contiguously:
+ // text
+ // original data and bss
+ // fixed-size stack
+ // expandable heap
uint sz; // user memory size
char *kstack; // kernel stack
enum proc_state state;