What would be the method for submiting a patch to to move this into
non-OS_specific code?

Here is the current diff from Linux to BSD...
-/**
- * Compute size order.  Returns the exponent of the smaller power of two
which
- * is greater or equal to given number.
- * 
- * \param size size.
- * \return order.
- *
- * \todo Can be made faster.
+
+/*
+ * Compute order.  Can be made faster.
  */
 int DRM(order)( unsigned long size )
 {
        int order;
        unsigned long tmp;
 
-       for (order = 0, tmp = size >> 1; tmp; tmp >>= 1, order++)
-               ;
+       for ( order = 0, tmp = size ; tmp >>= 1 ; ++order );
 
-       if (size & (size - 1))
+       if ( size & ~(1 << order) )
                ++order;
 
        return order;
 }

Aside from copying the doxygen it would be nice the spellout where the
name 'order' came from and what it means.  Do these functions still
compute the same value and can the changes be synced?



                
_______________________________
Do you Yahoo!?
Shop for Back-to-School deals on Yahoo! Shopping.
http://shopping.yahoo.com/backtoschool


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
--
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to