|
From: <sv...@va...> - 2005-12-22 19:50:48
|
Author: njn
Date: 2005-12-22 19:50:45 +0000 (Thu, 22 Dec 2005)
New Revision: 5408
Log:
Add comment about log2().
Modified:
trunk/coregrind/m_libcbase.c
trunk/include/pub_tool_libcbase.h
Modified: trunk/coregrind/m_libcbase.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_libcbase.c 2005-12-22 19:28:37 UTC (rev 5407)
+++ trunk/coregrind/m_libcbase.c 2005-12-22 19:50:45 UTC (rev 5408)
@@ -413,6 +413,7 @@
Misc useful functions
------------------------------------------------------------------ */
=20
+/* Returns the base-2 logarithm of x. Returns -1 if x is not a power of=
two. */
Int VG_(log2) ( Int x )=20
{
Int i;
Modified: trunk/include/pub_tool_libcbase.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/pub_tool_libcbase.h 2005-12-22 19:28:37 UTC (rev 5407)
+++ trunk/include/pub_tool_libcbase.h 2005-12-22 19:50:45 UTC (rev 5408)
@@ -111,7 +111,7 @@
extern void VG_(ssort)( void* base, SizeT nmemb, SizeT size,
Int (*compar)(void*, void*) );
=20
-/* Returns the base-2 logarithm of x. */
+/* Returns the base-2 logarithm of x. Returns -1 if x is not a power of=
two. */
extern Int VG_(log2) ( Int x );
=20
// A pseudo-random number generator returning a random UInt. If pSeed
|