summaryrefslogtreecommitdiffstats
path: root/cddl/contrib/opensolaris/lib
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2014-04-18 21:15:12 +0000
committerdelphij <delphij@FreeBSD.org>2014-04-18 21:15:12 +0000
commit3344ccfa375a376875af16049d67758b63e930ef (patch)
treef9b95868ce5b65d893f646a7e4cc05e9a66369cc /cddl/contrib/opensolaris/lib
parentef8414677a5e2e9e8fac2c7a4caeb1e1d059e3eb (diff)
downloadFreeBSD-src-3344ccfa375a376875af16049d67758b63e930ef.zip
FreeBSD-src-3344ccfa375a376875af16049d67758b63e930ef.tar.gz
MFV r264666:
4374 dn_free_ranges should use range_tree_t illumos/illumos-gate@bf16b11e8deb633dd6c4296d46e92399d1582df4 MFC after: 2 weeks
Diffstat (limited to 'cddl/contrib/opensolaris/lib')
-rw-r--r--cddl/contrib/opensolaris/lib/libzpool/common/kernel.c11
-rw-r--r--cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h4
2 files changed, 7 insertions, 8 deletions
diff --git a/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c b/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
index 19fbf4f..2b174f9 100644
--- a/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
+++ b/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
@@ -20,6 +20,8 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
+ * Copyright (c) 2013, Joyent, Inc. All rights reserved.
*/
#include <assert.h>
@@ -800,20 +802,17 @@ delay(clock_t ticks)
/*
* Find highest one bit set.
* Returns bit number + 1 of highest bit that is set, otherwise returns 0.
- * High order bit is 31 (or 63 in _LP64 kernel).
*/
int
-highbit(ulong_t i)
+highbit64(uint64_t i)
{
- register int h = 1;
+ int h = 1;
if (i == 0)
return (0);
-#ifdef _LP64
- if (i & 0xffffffff00000000ul) {
+ if (i & 0xffffffff00000000ULL) {
h += 32; i >>= 32;
}
-#endif
if (i & 0xffff0000) {
h += 16; i >>= 16;
}
diff --git a/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h b/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
index b5562c7..cc8285d 100644
--- a/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
+++ b/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
@@ -20,7 +20,7 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2013 by Delphix. All rights reserved.
+ * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
* Copyright (c) 2012, Joyent, Inc. All rights reserved.
*/
/*
@@ -558,7 +558,7 @@ extern void delay(clock_t ticks);
extern uint64_t physmem;
-extern int highbit(ulong_t i);
+extern int highbit64(uint64_t i);
extern int random_get_bytes(uint8_t *ptr, size_t len);
extern int random_get_pseudo_bytes(uint8_t *ptr, size_t len);
OpenPOWER on IntegriCloud