123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- #ifndef _PROC_H_
- #define _PROC_H_
- #include <spinlock.h>
- #include <thread.h> /* required for struct threadarray */
- struct addrspace;
- struct vnode;
- #ifdef UW
- struct semaphore;
- #endif
- struct proc {
- char *p_name;
- struct spinlock p_lock;
- struct threadarray p_threads;
-
- struct addrspace *p_addrspace;
-
- struct vnode *p_cwd;
- #ifdef UW
-
-
-
- struct vnode *console;
- #endif
-
- };
- extern struct proc *kproc;
- #ifdef UW
- extern struct semaphore *no_proc_sem;
- #endif
- void proc_bootstrap(void);
- struct proc *proc_create_runprogram(const char *name);
- void proc_destroy(struct proc *proc);
- int proc_addthread(struct proc *proc, struct thread *t);
- void proc_remthread(struct thread *t);
- struct addrspace *curproc_getas(void);
- struct addrspace *curproc_setas(struct addrspace *);
- #endif
|