Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Dec 2003 17:32:58 -0800 (PST)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 43335 for review
Message-ID:  <200312030132.hB31WwQC092011@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=43335

Change 43335 by peter@peter_overcee on 2003/12/02 17:32:38

	actually, since we've already checked for zero in the loop,
	directly call bsfq() rather than "ffsl() - 1".  In theory,
	gcc -O should optimize out the mask == 0 case (already tested)
	and the "- 1 + 1", but dont depend on it.  This is why we have
	RQB_FFS() exposed like this anyway.

Affected files ...

.. //depot/projects/hammer/sys/amd64/include/runq.h#6 edit

Differences ...

==== //depot/projects/hammer/sys/amd64/include/runq.h#6 (text+ko) ====

@@ -36,7 +36,7 @@
 #define	RQB_BIT(pri)	(1 << ((pri) & (RQB_BPW - 1)))
 #define	RQB_WORD(pri)	((pri) >> RQB_L2BPW)
 
-#define	RQB_FFS(word)	(ffsl(word) - 1)
+#define	RQB_FFS(word)	(bsfq(word))
 
 /*
  * Type of run queue status word.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200312030132.hB31WwQC092011>