summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe
diff options
context:
space:
mode:
authorMichael Brown2014-04-26 19:19:49 +0200
committerMichael Brown2014-04-26 19:19:49 +0200
commit3ffd309375c8f044939a77eb4738bc0b16c01965 (patch)
tree75447f704d1825f2018b1cf3171ccf299b369ff9 /src/include/ipxe
parent[test] Check for correct -mrtd assumption on libgcc arithmetic functions (diff)
downloadipxe-3ffd309375c8f044939a77eb4738bc0b16c01965.tar.gz
ipxe-3ffd309375c8f044939a77eb4738bc0b16c01965.tar.xz
ipxe-3ffd309375c8f044939a77eb4738bc0b16c01965.zip
[libc] Add isqrt() function to find integer square roots
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe')
-rw-r--r--src/include/ipxe/isqrt.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/include/ipxe/isqrt.h b/src/include/ipxe/isqrt.h
new file mode 100644
index 000000000..58ed42f0c
--- /dev/null
+++ b/src/include/ipxe/isqrt.h
@@ -0,0 +1,14 @@
+#ifndef _IPXE_ISQRT_H
+#define _IPXE_ISQRT_H
+
+/** @file
+ *
+ * Integer square root
+ *
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER );
+
+extern unsigned long isqrt ( unsigned long value );
+
+#endif /* _IPXE_ISQRT_H */