summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2013-07-11 01:24:13 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2013-07-11 01:24:13 +0000
commiteee92dd9b16cd1cd92ebbf4748b6256096180754 (patch)
treeed9f0fc598559b345672369b580c15addb32cf93
parent5452aa0c364a8aeed3df92836fc62f094ec72b40 (diff)
document fls/flsl
-rw-r--r--share/man/man9/Makefile4
-rw-r--r--share/man/man9/kern.916
2 files changed, 16 insertions, 4 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile
index 29b3d1d1ca3..3d85e79adbe 100644
--- a/share/man/man9/Makefile
+++ b/share/man/man9/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.181 2013/06/05 03:28:43 dlg Exp $
+# $OpenBSD: Makefile,v 1.182 2013/07/11 01:24:12 jsg Exp $
# $NetBSD: Makefile,v 1.4 1996/01/09 03:23:01 thorpej Exp $
# Makefile for section 9 (kernel function and variable) manual pages.
@@ -189,7 +189,7 @@ MLINKS+=kern.9 imax.9 kern.9 imin.9 kern.9 lmax.9 kern.9 lmin.9 \
kern.9 max.9 kern.9 min.9 kern.9 ulmax.9 kern.9 ulmin.9 kern.9 abs.9 \
kern.9 assert.9 kern.9 KASSERT.9 kern.9 KDASSERT.9 \
kern.9 skpc.9 kern.9 scanc.9 kern.9 bcmp.9 \
- kern.9 memchr.9 kern.9 memcmp.9 kern.9 ffs.9 \
+ kern.9 memchr.9 kern.9 memcmp.9 kern.9 ffs.9 kern.9 fls.9 kern.9 flsl.9 \
kern.9 strlen.9 kern.9 strncpy.9 kern.9 strlcpy.9 kern.9 strlcat.9 \
kern.9 strcmp.9 kern.9 strncmp.9 kern.9 strncasecmp.9 \
kern.9 strnlen.9 \
diff --git a/share/man/man9/kern.9 b/share/man/man9/kern.9
index b12f83435d0..315572de2d5 100644
--- a/share/man/man9/kern.9
+++ b/share/man/man9/kern.9
@@ -1,4 +1,4 @@
-.\" $OpenBSD: kern.9,v 1.17 2013/06/08 19:06:51 sf Exp $
+.\" $OpenBSD: kern.9,v 1.18 2013/07/11 01:24:12 jsg Exp $
.\"
.\" Copyright (c) 2002, 2003 CubeSoft Communications, Inc.
.\" <http://www.csoft.org>
@@ -24,7 +24,7 @@
.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: June 8 2013 $
+.Dd $Mdocdate: July 11 2013 $
.Dt KERN 9
.Os
.Sh NAME
@@ -136,6 +136,10 @@ declarations are allowed.
.Fn memcmp "const void *b1" "const void *b2" "size_t len"
.Ft int
.Fn ffs "int value"
+.Ft int
+.Fn fls "int value"
+.Ft int
+.Fn flsl "long value"
.nr nS 0
.Pp
The
@@ -162,6 +166,14 @@ occurred, or zero if
.Fa mask
is not present in the string.
.Pp
+The
+.Fn fls
+and
+.Fn flsl
+functions find the last bit set in
+.Fa value
+and return the index of that bit.
+.Pp
The remaining functions have the same semantics as their libc counterparts,
.Xr bcmp 3 ,
.Xr timingsafe_bcmp 3 ,