Page MenuHomeFreeBSD

D3962.id9579.diff
No OneTemporary

D3962.id9579.diff

Index: sys/conf/files.arm
===================================================================
--- sys/conf/files.arm
+++ sys/conf/files.arm
@@ -120,6 +120,7 @@
libkern/ashrdi3.c standard
libkern/divdi3.c standard
libkern/ffsl.c standard
+libkern/ffsll.c standard
libkern/fls.c standard
libkern/flsl.c standard
libkern/flsll.c standard
Index: sys/conf/files.arm64
===================================================================
--- sys/conf/files.arm64
+++ sys/conf/files.arm64
@@ -81,6 +81,7 @@
libkern/bcmp.c standard
libkern/ffs.c standard
libkern/ffsl.c standard
+libkern/ffsll.c standard
libkern/fls.c standard
libkern/flsl.c standard
libkern/flsll.c standard
Index: sys/conf/files.i386
===================================================================
--- sys/conf/files.i386
+++ sys/conf/files.i386
@@ -530,6 +530,7 @@
kern/imgact_gzip.c optional gzip
kern/subr_sfbuf.c standard
libkern/divdi3.c standard
+libkern/ffsll.c standard
libkern/flsll.c standard
libkern/memmove.c standard
libkern/memset.c standard
Index: sys/conf/files.mips
===================================================================
--- sys/conf/files.mips
+++ sys/conf/files.mips
@@ -55,6 +55,7 @@
# gcc/clang runtime
libkern/ffsl.c standard
+libkern/ffsll.c standard
libkern/fls.c standard
libkern/flsl.c standard
libkern/flsll.c standard
Index: sys/conf/files.pc98
===================================================================
--- sys/conf/files.pc98
+++ sys/conf/files.pc98
@@ -222,6 +222,7 @@
kern/imgact_gzip.c optional gzip
kern/subr_sfbuf.c standard
libkern/divdi3.c standard
+libkern/ffsll.c standard
libkern/flsll.c standard
libkern/memmove.c standard
libkern/memset.c standard
Index: sys/conf/files.powerpc
===================================================================
--- sys/conf/files.powerpc
+++ sys/conf/files.powerpc
@@ -87,6 +87,7 @@
libkern/divdi3.c optional powerpc
libkern/ffs.c standard
libkern/ffsl.c standard
+libkern/ffsll.c standard
libkern/fls.c standard
libkern/flsl.c standard
libkern/flsll.c standard
Index: sys/conf/files.sparc64
===================================================================
--- sys/conf/files.sparc64
+++ sys/conf/files.sparc64
@@ -67,6 +67,7 @@
kern/subr_sfbuf.c standard
libkern/ffs.c standard
libkern/ffsl.c standard
+libkern/ffsll.c standard
libkern/fls.c standard
libkern/flsl.c standard
libkern/flsll.c standard
Index: sys/libkern/ffsll.c
===================================================================
--- /dev/null
+++ sys/libkern/ffsll.c
@@ -0,0 +1,45 @@
+/*-
+ * Copyright (c) 2015 EMC Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/libkern.h>
+
+/*
+ * Find First Set bit
+ */
+int
+ffsll(long long mask)
+{
+ int bit;
+
+ if (mask == 0)
+ return (0);
+ for (bit = 1; !(mask & 1); bit++)
+ mask = (unsigned long long)mask >> 1;
+ return (bit);
+}
Index: sys/sys/libkern.h
===================================================================
--- sys/sys/libkern.h
+++ sys/sys/libkern.h
@@ -89,6 +89,9 @@
#ifndef HAVE_INLINE_FFSL
int ffsl(long);
#endif
+#ifndef HAVE_INLINE_FFSLL
+int ffsll(long long);
+#endif
#ifndef HAVE_INLINE_FLS
int fls(int);
#endif

File Metadata

Mime Type
text/plain
Expires
Mon, Feb 2, 1:27 PM (7 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28413975
Default Alt Text
D3962.id9579.diff (4 KB)

Event Timeline