Some proc cleanup, moving some of copyproc into allocproc.
Also, an experiment: use "thread-local" storage for c and cp instead of the #define macro for curproc[cpu()].
This commit is contained in:
parent
0c7f483838
commit
19333efb9e
9 changed files with 147 additions and 118 deletions
11
defs.h
11
defs.h
|
|
@ -73,6 +73,7 @@ extern volatile uint* lapic;
|
|||
void lapiceoi(void);
|
||||
void lapicinit(int);
|
||||
void lapicstartap(uchar, uint);
|
||||
void microdelay(int);
|
||||
|
||||
// mp.c
|
||||
extern int ismp;
|
||||
|
|
@ -92,14 +93,14 @@ int pipewrite(struct pipe*, char*, int);
|
|||
|
||||
// proc.c
|
||||
struct proc* copyproc(struct proc*);
|
||||
struct proc* curproc(void);
|
||||
void exit(void);
|
||||
int growproc(int);
|
||||
int kill(int);
|
||||
void pinit(void);
|
||||
void procdump(void);
|
||||
void scheduler(void) __attribute__((noreturn));
|
||||
void setupsegs(struct proc*);
|
||||
void ksegment(void);
|
||||
void usegment(void);
|
||||
void sleep(void*, struct spinlock*);
|
||||
void userinit(void);
|
||||
int wait(void);
|
||||
|
|
@ -144,6 +145,12 @@ extern int ticks;
|
|||
void tvinit(void);
|
||||
extern struct spinlock tickslock;
|
||||
|
||||
// uart.c
|
||||
void uartinit(void);
|
||||
void uartintr(void);
|
||||
void uartputc(int);
|
||||
|
||||
|
||||
// number of elements in fixed-size array
|
||||
#define NELEM(x) (sizeof(x)/sizeof((x)[0]))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue