Re: [PATCH] PAG support, try #2

David Howells
2003-05-14T11:50:33Z

> > +typedef __kernel_pag_t pag_t;
>
> > +static pag_t vfs_pag_next = 1;
>
> > + vfspag->pag = vfs_pag_next++;
> > + if (vfspag->pag < 1)
> > + vfspag->pag = 1;
>
> Is there a reason pag_t isn't an unsigned int? Seems to me you'll have
> 2^31 good times followed by 2^31 bad times. Also, isn't signed overflow
> one of these undefined things? I wouldn't mention it except that gcc
> seem to be more and more fond of obeying the letter of the standard
> rather than doing useful stuff.

I made it the same as pid_t. However, -ve PIDs can have special meanings which
aren't applicable to PAGs, so I suppose it ought to be unsigned. Time to
change it again. Sigh.

David