Subject: Re: new pid allocation code
To: Alan Barrett <firstname.lastname@example.org>
From: David Laight <email@example.com>
Date: 03/13/2003 09:55:21
> I see several changes from lists managed by macros to lists managed by
> hand-coded pointer manipulation. Is this wise?
> For example:
> > Index: sys/proc.h
> > -extern struct proclist deadproc; /* List of dead processes */
> > +extern struct proc *deadprocs; /* List of dead processes */
> > Index: kern/kern_exit.c
> > - LIST_INSERT_HEAD(&deadproc, p, p_hash);
> > + p->p_dead = deadprocs;
> > + deadprocs = p;
Well the deadproc list was using the p_hash member - which no longer exists.
Since processes only sit on the deadprocs list for a very short time,
changing it for FIFO to LIFO isn't an issue.
A LIFO list doesn't need any macros...
For a readability point of view I find the 'hand-coded pointer manipulation'
better than the list macros.
David Laight: firstname.lastname@example.org