On Mon, Aug 23, 2004 at 12:15:34PM +0100, Dave Airlie wrote: > @@ -631,7 +631,15 @@ > int slots = ( RADEON_READ( RADEON_RBBM_STATUS ) > & RADEON_RBBM_FIFOCNT_MASK ); > if ( slots >= entries ) return 0; > - DRM_UDELAY( 1 ); > + > + if (need_resched()) { > + cond_resched(); > + } > + > + if (( i & 127 ) == 127 ) { > + msleep(1); > + } > + // DRM_UDELAY( 1 ); > } > > #if RADEON_FIFO_DEBUG > @@ -656,7 +664,14 @@ > radeon_do_pixcache_flush( dev_priv ); > return 0; > } > - DRM_UDELAY( 1 ); > + > + if (need_resched()) { > + cond_resched(); > + } > + > + if (( i & 127 ) == 127 ) { > + msleep(1); > + } > }
The cond_resched() already does a need_resched() check for you, so you could do away with the conditionals here. Dave ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 -- _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel