summaryrefslogtreecommitdiff
path: root/ace/ACE.i
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1997-08-30 21:43:06 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1997-08-30 21:43:06 +0000
commitc23c7898ab3356a6b81b86dbf7f2c4dcd5aedafd (patch)
tree68f38ce76cc098cb0aa795700501c5eb1068c026 /ace/ACE.i
parent3ba37cd2ee31fab525d8c7181d000e4558845c10 (diff)
downloadATCD-c23c7898ab3356a6b81b86dbf7f2c4dcd5aedafd.tar.gz
*** empty log message ***
Diffstat (limited to 'ace/ACE.i')
-rw-r--r--ace/ACE.i10
1 files changed, 10 insertions, 0 deletions
diff --git a/ace/ACE.i b/ace/ACE.i
index 8d00aed2d7c..d6d3398a053 100644
--- a/ace/ACE.i
+++ b/ace/ACE.i
@@ -65,3 +65,13 @@ ACE::get_flags (ACE_HANDLE handle)
return ACE_OS::fcntl (handle, F_GETFL, 0);
}
+inline u_long
+ACE::log2 (u_long num)
+{
+ for (u_long log = 0;
+ num > 0;
+ log++)
+ num >>= 1;
+
+ return log;
+}