bitmap_bitremap man page on Oracle

 Man page or keyword search:   man All Sections 1 - General Commands 2 - System Calls 3 - Subroutines, Functions 4 - Special Files 5 - File Formats 6 - Games and Screensavers 7 - Macros and Conventions 8 - Maintenence Commands 9 - Kernel Interface New Commands Server 4.4BSD AIX Alpinelinux Archlinux Aros BSDOS BSDi Bifrost CentOS Cygwin Darwin Debian DigitalUNIX DragonFly ElementaryOS Fedora FreeBSD Gentoo GhostBSD HP-UX Haiku Hurd IRIX Inferno JazzOS Kali Knoppix LinuxMint MacOSX Mageia Mandriva Manjaro Minix MirBSD NeXTSTEP NetBSD OPENSTEP OSF1 OpenBSD OpenDarwin OpenIndiana OpenMandriva OpenServer OpenSuSE OpenVMS Oracle PC-BSD Peanut Pidora Plan9 QNX Raspbian RedHat Scientific Slackware SmartOS Solaris SuSE SunOS Syllable Tru64 UNIXv7 Ubuntu Ultrix UnixWare Xenix YellowDog aLinux   33470 pages apropos Keyword Search (all sections) Output format html ascii pdf view pdf save postscript
[printable version]

BITMAP_BITREMAP(9)	Basic Kernel Library Functions	    BITMAP_BITREMAP(9)

NAME
bitmap_bitremap - Apply map defined by a pair of bitmaps to a single
bit

SYNOPSIS
int bitmap_bitremap(int oldbit, const unsigned long * old,
const unsigned long * new, int bits);

ARGUMENTS
oldbit
bit position to be mapped

old
defines domain of map

new
defines range of map

bits
number of bits in each of these bitmaps

DESCRIPTION
Let old and new define a mapping of bit positions, such that whatever
position is held by the n-th set bit in old is mapped to the n-th set
bit in new. In the more general case, allowing for the possibility that
the weight 'w' of new is less than the weight of old, map the position
of the n-th set bit in old to the position of the m-th set bit in new,
where m == n % w.

The positions of unset bits in old are mapped to themselves (the
identify map).

Apply the above specified mapping to bit position oldbit, returning the
new bit position.

For example, lets say that old has bits 4 through 7 set, and new has
bits 12 through 15 set. This defines the mapping of bit position 4 to
12, 5 to 13, 6 to 14 and 7 to 15, and of all other bit positions
unchanged. So if say oldbit is 5, then this routine returns 13.

Kernel Hackers Manual 3.8.	   June 2014		    BITMAP_BITREMAP(9)
[top]

List of man pages available for Oracle

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.