=================================================================== RCS file: /cvs/prex-old/usr/server/proc/hash.c,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -u -r1.1.1.1 -r1.1.1.1.2.1 --- prex-old/usr/server/proc/hash.c 2008/06/03 10:38:51 1.1.1.1 +++ prex-old/usr/server/proc/hash.c 2008/08/13 17:12:45 1.1.1.1.2.1 @@ -56,8 +56,8 @@ head = &pid_hash[IDHASH(pid)]; n = list_first(head); while (n != head) { - p = list_entry(n, struct proc, pid_link); - if (p->pid == pid) + p = list_entry(n, struct proc, p_pid_link); + if (p->p_pid == pid) return p; n = list_next(n); } @@ -76,8 +76,8 @@ head = &pgid_hash[IDHASH(pgid)]; n = list_first(head); while (n != head) { - g = list_entry(n, struct pgrp, pgid_link); - if (g->pgid == pgid) + g = list_entry(n, struct pgrp, pg_link); + if (g->pg_pgid == pgid) return g; n = list_next(n); } @@ -96,8 +96,8 @@ head = &task_hash[IDHASH(task)]; n = list_first(head); while (n != head) { - p = list_entry(n, struct proc, task_link); - if (p->task == task) + p = list_entry(n, struct proc, p_task_link); + if (p->p_task == task) return p; n = list_next(n); } @@ -109,22 +109,22 @@ * This routine assumes pid and task data has been already initialized. */ void -proc_add(struct proc *proc) +proc_add(struct proc *p) { - list_insert(&pid_hash[IDHASH(proc->pid)], &proc->pid_link); - list_insert(&task_hash[IDHASH(proc->task)], &proc->task_link); + list_insert(&pid_hash[IDHASH(p->p_pid)], &p->p_pid_link); + list_insert(&task_hash[IDHASH(p->p_task)], &p->p_task_link); } /* * Remove process from both of pid table and task table. */ void -proc_remove(struct proc *proc) +proc_remove(struct proc *p) { - list_remove(&proc->pid_link); - list_remove(&proc->task_link); + list_remove(&p->p_pid_link); + list_remove(&p->p_task_link); } /* @@ -135,7 +135,7 @@ pgrp_add(struct pgrp *pgrp) { - list_insert(&pgid_hash[IDHASH(pgrp->pgid)], &pgrp->pgid_link); + list_insert(&pgid_hash[IDHASH(pgrp->pg_pgid)], &pgrp->pg_link); } /* @@ -145,7 +145,7 @@ pgrp_remove(struct pgrp *pgrp) { - list_remove(&pgrp->pgid_link); + list_remove(&pgrp->pg_link); } /*