summaryrefslogtreecommitdiff
path: root/kernel/proc.h
diff options
context:
space:
mode:
authorMole Shang <[email protected]>2024-02-13 19:39:56 +0800
committerMole Shang <[email protected]>2024-02-13 19:39:56 +0800
commit89ef6f717ed4b3e702e5f6f906f58fe1ea27d366 (patch)
tree760cce316675479a6cca77551438e8d2cc5fe9ae /kernel/proc.h
parentcfae93475dfb4cb5cfe264f4c029136e1447c262 (diff)
parent4a6593f1a6f666c618d303a4858c4c6d31b41c63 (diff)
downloadxv6-labs-89ef6f717ed4b3e702e5f6f906f58fe1ea27d366.tar.gz
xv6-labs-89ef6f717ed4b3e702e5f6f906f58fe1ea27d366.tar.bz2
xv6-labs-89ef6f717ed4b3e702e5f6f906f58fe1ea27d366.zip
Merge branch 'cow' into net
Conflicts: .gitignore Makefile conf/lab.mk kernel/defs.h kernel/syscall.c kernel/vm.c user/pingpong.c user/user.h user/usys.pl
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
};