summaryrefslogtreecommitdiff
path: root/proc.h
diff options
context:
space:
mode:
authorrsc <rsc>2006-07-16 01:15:28 +0000
committerrsc <rsc>2006-07-16 01:15:28 +0000
commit65bd8e139a8368e987455a10ec59dd7b079b3af1 (patch)
tree8ce996135fadab4abde8acf5a6ed4eb69d463c60 /proc.h
parent40a2a08319511fd157d2d77eefbda52423cc81ec (diff)
downloadxv6-labs-65bd8e139a8368e987455a10ec59dd7b079b3af1.tar.gz
xv6-labs-65bd8e139a8368e987455a10ec59dd7b079b3af1.tar.bz2
xv6-labs-65bd8e139a8368e987455a10ec59dd7b079b3af1.zip
New scheduler.
Removed cli and sti stack in favor of tracking number of locks held on each CPU and explicit conditionals in spinlock.c.
Diffstat (limited to 'proc.h')
-rw-r--r--proc.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/proc.h b/proc.h
index d8aa84f..60ef7f5 100644
--- a/proc.h
+++ b/proc.h
@@ -33,7 +33,7 @@ struct jmpbuf {
int jb_eip;
};
-enum proc_state { UNUSED, EMBRYO, WAITING, RUNNABLE, RUNNING, ZOMBIE };
+enum proc_state { UNUSED, EMBRYO, SLEEPING, RUNNABLE, RUNNING, ZOMBIE };
struct proc{
char *mem; // start of process's physical memory
@@ -46,7 +46,6 @@ struct proc{
int ppid;
void *chan; // sleep
int killed;
- int locks; // # of locks currently held
struct fd *fds[NOFILE];
struct Taskstate ts; // only to give cpu address of kernel stack
@@ -71,7 +70,7 @@ struct cpu {
struct jmpbuf jmpbuf;
char mpstack[MPSTACK]; // per-cpu start-up stack, only used to get into main()
struct proc *lastproc; // last proc scheduled on this cpu (never NULL)
- int clis; // cli() nesting depth
+ int nlock; // # of locks currently held
};
extern struct cpu cpus[NCPU];