summaryrefslogtreecommitdiff
path: root/kernel/proc.h
diff options
context:
space:
mode:
authorMole Shang <[email protected]>2024-02-14 20:46:23 +0800
committerMole Shang <[email protected]>2024-02-14 20:46:23 +0800
commitf98eeb30507040dc916b2a337818830954ee1d4a (patch)
treea741cb0bbd6be96d8084e72b4af895ac093a2b48 /kernel/proc.h
parent0de5ac779602f562a038e5ad27163d85bc71638b (diff)
parent904885a96efd1dd0221585f67477f5a39bcce7f7 (diff)
downloadxv6-labs-f98eeb30507040dc916b2a337818830954ee1d4a.tar.gz
xv6-labs-f98eeb30507040dc916b2a337818830954ee1d4a.tar.bz2
xv6-labs-f98eeb30507040dc916b2a337818830954ee1d4a.zip
Merge branch 'net' into lock
Conflicts: .gitignore Makefile conf/lab.mk kernel/defs.h user/user.h
Diffstat (limited to 'kernel/proc.h')
-rw-r--r--kernel/proc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/proc.h b/kernel/proc.h
index d021857..a195b02 100644
--- a/kernel/proc.h
+++ b/kernel/proc.h
@@ -91,6 +91,7 @@ struct proc {
int killed; // If non-zero, have been killed
int xstate; // Exit status to be returned to parent's wait
int pid; // Process ID
+ int trace_mask; // SYS_trace mask (1 << SYS_xxx)
// wait_lock must be held when using this:
struct proc *parent; // Parent process
@@ -100,8 +101,14 @@ struct proc {
uint64 sz; // Size of process memory (bytes)
pagetable_t pagetable; // User page table
struct trapframe *trapframe; // data page for trampoline.S
+ struct usyscall *usyscall; // data page for usyscall
struct context context; // swtch() here to run process
struct file *ofile[NOFILE]; // Open files
struct inode *cwd; // Current directory
char name[16]; // Process name (debugging)
+ int alarm_interval; // sigalarm syscall interval
+ uint64 alarm_handler; // sigalarm syscall handler
+ int alarm_tickspassed; // record how many ticks passed since last sigalarm handler call
+ int alarm_caninvoke; // prevent re-entrant calls to handler
+ struct trapframe *atpfm; // trapframe to resume after handling, must hold p->lock
};