summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/sys
diff options
context:
space:
mode:
authorPatrick Mooney <pmooney@pfmooney.com>2022-05-06 19:21:02 +0000
committerPatrick Mooney <pmooney@oxide.computer>2022-05-09 21:15:08 +0000
commitbadf94ff3599fab15963f6c532929e9bc411757a (patch)
treeaaa20258cd33c18632c3fa60cf30d2cd8a94c3dc /usr/src/uts/common/sys
parent9514ab446512446bdb11f38ddcd2b71404b155a1 (diff)
downloadillumos-gate-badf94ff3599fab15963f6c532929e9bc411757a.tar.gz
14678 bitmap functions could be more const
Reviewed by: Yuri Pankov <ypankov@tintri.com> Reviewed by: Dan McDonald <danmcd@mnx.io> Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src/uts/common/sys')
-rw-r--r--usr/src/uts/common/sys/bitmap.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr/src/uts/common/sys/bitmap.h b/usr/src/uts/common/sys/bitmap.h
index 5e6385811f..4282dca097 100644
--- a/usr/src/uts/common/sys/bitmap.h
+++ b/usr/src/uts/common/sys/bitmap.h
@@ -28,6 +28,7 @@
* Copyright (c) 2014 by Delphix. All rights reserved.
* Copyright 2015 Nexenta Systems, Inc. All rights reserved.
* Copyright 2017 RackTop Systems.
+ * Copyright 2022 Oxide Computer Company
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
@@ -142,14 +143,13 @@ extern "C" {
/*
* return next available bit index from map with specified number of bits
*/
-extern index_t bt_availbit(ulong_t *bitmap, size_t nbits);
+extern index_t bt_availbit(const ulong_t *, size_t);
/*
* find the highest order bit that is on, and is within or below
* the word specified by wx
*/
-extern int bt_gethighbit(ulong_t *mapp, int wx);
-extern int bt_range(ulong_t *bitmap, size_t *pos1, size_t *pos2,
- size_t end_pos);
+extern int bt_gethighbit(const ulong_t *, int wx);
+extern int bt_range(const ulong_t *, size_t *, size_t *, size_t);
/*
* Find highest and lowest one bit set.
* Returns bit number + 1 of bit that is set, otherwise returns 0.
@@ -158,8 +158,8 @@ extern int bt_range(ulong_t *bitmap, size_t *pos1, size_t *pos2,
extern int highbit(ulong_t);
extern int highbit64(uint64_t);
extern int lowbit(ulong_t);
-extern int bt_getlowbit(ulong_t *bitmap, size_t start, size_t stop);
-extern void bt_copy(ulong_t *, ulong_t *, ulong_t);
+extern int bt_getlowbit(const ulong_t *, size_t, size_t);
+extern void bt_copy(const ulong_t *, ulong_t *, ulong_t);
/*
* find the parity