summaryrefslogtreecommitdiff
path: root/defs.h
diff options
context:
space:
mode:
authorFrans Kaashoek <[email protected]>2017-01-31 20:21:14 -0500
committerFrans Kaashoek <[email protected]>2017-01-31 20:21:14 -0500
commitfbb4c0944422f860484142010bb9f366f3e87bf8 (patch)
tree5e339842d43d09a4d23f1a2165391f00af30e308 /defs.h
parentabf847a083888bbed4260ecacf849ea19f23e810 (diff)
downloadxv6-labs-fbb4c0944422f860484142010bb9f366f3e87bf8.tar.gz
xv6-labs-fbb4c0944422f860484142010bb9f366f3e87bf8.tar.bz2
xv6-labs-fbb4c0944422f860484142010bb9f366f3e87bf8.zip
Read curproc from cpu structure, but be careful because after a schedule event
myproc() points to a different thread. myproc(); sched(); myproc(); // this proc maybe different than the one before sched Thus, in a function that operates on one thread better to retrieve the current process once at the start of the function.
Diffstat (limited to 'defs.h')
-rw-r--r--defs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/defs.h b/defs.h
index 67ea9f6..5e049ae 100644
--- a/defs.h
+++ b/defs.h
@@ -108,6 +108,7 @@ void exit(void);
int fork(void);
int growproc(int);
int kill(int);
+struct proc* myproc();
void pinit(void);
void procdump(void);
void scheduler(void) __attribute__((noreturn));