Port-powerpc archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bzero
On Wed, Nov 14, 2001 at 10:06:36AM +1100, Simon Burge wrote:
> The latest code drop from Martin includes fetching the cache line size
> with the machdep.cachelinesize sysctl.
While I haven't looked at the code yet (at all :-), I have some
comments that may or may not be useful:
(1) The cacheline size should be cached. I.e. check it, if
zero, then do the sysctl to fetch it, otherwise just
use the cached value.
(2) An optimized bzero() is cool, but the standard API is
memset(). I suppose you want to check to see if the
value argument to memset() is 0 (which should be an
extremely common case) and branch to the optimized
zero loop if so.
--
-- Jason R. Thorpe <thorpej%wasabisystems.com@localhost>
Home |
Main Index |
Thread Index |
Old Index