diff options
author | rtm <rtm> | 2006-07-01 21:26:01 +0000 |
---|---|---|
committer | rtm <rtm> | 2006-07-01 21:26:01 +0000 |
commit | 8b4e2a08febc8b957b44732dbc7da831479a0005 (patch) | |
tree | 46c3b079ec65f0efbd1f3b603f1b11a3ae09e56d /proc.h | |
parent | f7cea12b38a86e9b37fa5bc635310d3f85e5f8db (diff) | |
download | xv6-labs-8b4e2a08febc8b957b44732dbc7da831479a0005.tar.gz xv6-labs-8b4e2a08febc8b957b44732dbc7da831479a0005.tar.bz2 xv6-labs-8b4e2a08febc8b957b44732dbc7da831479a0005.zip |
swtch saves callee-saved registers
swtch idles on per-CPU stack, not on calling process's stack
fix pipe bugs
usertest.c tests pipes, fork, exit, close
Diffstat (limited to 'proc.h')
-rw-r--r-- | proc.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -37,3 +37,14 @@ struct proc{ extern struct proc proc[]; extern struct proc *curproc[NCPU]; + +#define MPSTACK 512 + +struct cpu { + uint8_t apicid; // Local APIC ID + int lintr[2]; // Local APIC + char mpstack[MPSTACK]; // per-cpu start-up stack, only used to get into main() +}; + +extern struct cpu cpus[NCPU]; +extern int ncpu; |