diff options
Diffstat (limited to 'include/linux/bitmap.h')
-rw-r--r-- | include/linux/bitmap.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h index acad1105d942..43b406def35f 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h | |||
@@ -46,6 +46,8 @@ | |||
46 | * bitmap_shift_left(dst, src, n, nbits) *dst = *src << n | 46 | * bitmap_shift_left(dst, src, n, nbits) *dst = *src << n |
47 | * bitmap_remap(dst, src, old, new, nbits) *dst = map(old, new)(src) | 47 | * bitmap_remap(dst, src, old, new, nbits) *dst = map(old, new)(src) |
48 | * bitmap_bitremap(oldbit, old, new, nbits) newbit = map(old, new)(oldbit) | 48 | * bitmap_bitremap(oldbit, old, new, nbits) newbit = map(old, new)(oldbit) |
49 | * bitmap_onto(dst, orig, relmap, nbits) *dst = orig relative to relmap | ||
50 | * bitmap_fold(dst, orig, sz, nbits) dst bits = orig bits mod sz | ||
49 | * bitmap_scnprintf(buf, len, src, nbits) Print bitmap src to buf | 51 | * bitmap_scnprintf(buf, len, src, nbits) Print bitmap src to buf |
50 | * bitmap_parse(buf, buflen, dst, nbits) Parse bitmap dst from kernel buf | 52 | * bitmap_parse(buf, buflen, dst, nbits) Parse bitmap dst from kernel buf |
51 | * bitmap_parse_user(ubuf, ulen, dst, nbits) Parse bitmap dst from user buf | 53 | * bitmap_parse_user(ubuf, ulen, dst, nbits) Parse bitmap dst from user buf |
@@ -108,6 +110,7 @@ extern int __bitmap_weight(const unsigned long *bitmap, int bits); | |||
108 | 110 | ||
109 | extern int bitmap_scnprintf(char *buf, unsigned int len, | 111 | extern int bitmap_scnprintf(char *buf, unsigned int len, |
110 | const unsigned long *src, int nbits); | 112 | const unsigned long *src, int nbits); |
113 | extern int bitmap_scnprintf_len(unsigned int len); | ||
111 | extern int __bitmap_parse(const char *buf, unsigned int buflen, int is_user, | 114 | extern int __bitmap_parse(const char *buf, unsigned int buflen, int is_user, |
112 | unsigned long *dst, int nbits); | 115 | unsigned long *dst, int nbits); |
113 | extern int bitmap_parse_user(const char __user *ubuf, unsigned int ulen, | 116 | extern int bitmap_parse_user(const char __user *ubuf, unsigned int ulen, |
@@ -120,6 +123,10 @@ extern void bitmap_remap(unsigned long *dst, const unsigned long *src, | |||
120 | const unsigned long *old, const unsigned long *new, int bits); | 123 | const unsigned long *old, const unsigned long *new, int bits); |
121 | extern int bitmap_bitremap(int oldbit, | 124 | extern int bitmap_bitremap(int oldbit, |
122 | const unsigned long *old, const unsigned long *new, int bits); | 125 | const unsigned long *old, const unsigned long *new, int bits); |
126 | extern void bitmap_onto(unsigned long *dst, const unsigned long *orig, | ||
127 | const unsigned long *relmap, int bits); | ||
128 | extern void bitmap_fold(unsigned long *dst, const unsigned long *orig, | ||
129 | int sz, int bits); | ||
123 | extern int bitmap_find_free_region(unsigned long *bitmap, int bits, int order); | 130 | extern int bitmap_find_free_region(unsigned long *bitmap, int bits, int order); |
124 | extern void bitmap_release_region(unsigned long *bitmap, int pos, int order); | 131 | extern void bitmap_release_region(unsigned long *bitmap, int pos, int order); |
125 | extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order); | 132 | extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order); |