Clean up kernel/proc, remove devs_spinlock, remove PROC_DIE() macro
This commit is contained in:
@ -141,7 +141,6 @@ Proc *proc_spawnuser(char *mountpoint, char *path) {
|
||||
proc->pid = pids++;
|
||||
proc->mman_map_base = PROC_MMAN_MAP_BASE;
|
||||
spinlock_init(&proc->pipes_spinlock);
|
||||
spinlock_init(&proc->devs_spinlock);
|
||||
|
||||
proc->pipes[0] = dlmalloc(sizeof(IpcPipe));
|
||||
ipc_pipeinit(proc->pipes[0], proc->pid);
|
||||
|
||||
@ -61,7 +61,6 @@ typedef struct Proc {
|
||||
SpinLock pipes_spinlock;
|
||||
|
||||
Dev *devs[PROC_DEVHANDLES_MAX];
|
||||
SpinLock devs_spinlock;
|
||||
|
||||
struct {
|
||||
ProcArg *list;
|
||||
@ -88,13 +87,6 @@ void proc_sched(void *cpustate);
|
||||
void proc_killself(void);
|
||||
void proc_kill(Proc *proc);
|
||||
|
||||
#define PROC_DIE() \
|
||||
do { \
|
||||
proc_killself(); \
|
||||
for(;;); \
|
||||
} while(0)
|
||||
|
||||
|
||||
#define PROC_ARG(proc, str) \
|
||||
do { \
|
||||
ProcArg *__arg = dlmalloc(sizeof(*__arg)); \
|
||||
|
||||
Reference in New Issue
Block a user