The ( i > MAX_HAMMER_GARTS) fix was just an example. The test really needs to be == and be moved before the

hammers[i++] = loop_dev;

assignment, or hammers will be overflowed, as I mentioned in my previous email.

Also, it really seems like this test should be done before you go through all the trouble of detecting another gart. If we already have the max number of hammer garts, why try to detect another one, we can just return -1 and be done with it right?

Thanks for the fix though.

-James

Dave Jones wrote:

On Wed, Nov 19, 2003 at 12:13:37PM -0800, James Jones wrote:
> > > Ronny V. Vindenes wrote
> > >It looks like you'll add GARTS up to MAX_HAMMER_GARTS-1 then bomb if
> >there is an MAX_HAMMER_GARTS'th GART.
> > > >
> Yes, thanks for putting it more clearly Ronny.
> > Dave, try walking through the code with MAX_HAMMER_GARTS=2 and SMP > enabled. You should quickly see what we mean. Even with > MAX_HAMMER_GARTS=1 and SMP enabled (running SMP support on one > processor) which was the case I was trying to explain, it should fail.


Now changed to your proposed change (i > MAX_HAMMER_GARTS)

Thanks again.
                
                Dave









-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to