summaryrefslogtreecommitdiff
path: root/kernel/proc.h
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2020-11-05 07:32:10 -0500
committerRobert Morris <[email protected]>2020-11-05 07:32:10 -0500
commitbc943c230960c414fd43b93317c3825f1a99c611 (patch)
treea2b89fe071e83d7e9b6d49d582bee8301e40dc9c /kernel/proc.h
parent7dea4b93c82354d5a24e8882860af5a1d92282e6 (diff)
downloadxv6-labs-bc943c230960c414fd43b93317c3825f1a99c611.tar.gz
xv6-labs-bc943c230960c414fd43b93317c3825f1a99c611.tar.bz2
xv6-labs-bc943c230960c414fd43b93317c3825f1a99c611.zip
don't over-lock in exit()
Diffstat (limited to 'kernel/proc.h')
-rw-r--r--kernel/proc.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/proc.h b/kernel/proc.h
index e86bde1..8e90008 100644
--- a/kernel/proc.h
+++ b/kernel/proc.h
@@ -88,12 +88,14 @@ struct proc {
// p->lock must be held when using these:
enum procstate state; // Process state
- struct proc *parent; // Parent process
void *chan; // If non-zero, sleeping on chan
int killed; // If non-zero, have been killed
int xstate; // Exit status to be returned to parent's wait
int pid; // Process ID
+ // proc_tree_lock must be held when using this:
+ struct proc *parent; // Parent process
+
// these are private to the process, so p->lock need not be held.
uint64 kstack; // Virtual address of kernel stack
uint64 sz; // Size of process memory (bytes)