Chapter 4. Basic Kernel Library Functions

Table of Contents

Bitmap Operations
Command-line Parsing
CRC Functions

The Linux kernel provides more basic utility functions.

Bitmap Operations

__bitmap_shift_right — logical right shift of the bits in a bitmap
__bitmap_shift_left — logical left shift of the bits in a bitmap
bitmap_scnprintf — convert bitmap to an ASCII hex string.
__bitmap_parse — convert an ASCII hex string into a bitmap.
bitmap_parse_user
bitmap_scnlistprintf — convert bitmap to list format ASCII string
bitmap_parselist — convert list format ASCII string to bitmap
bitmap_remap — Apply map defined by a pair of bitmaps to another bitmap
bitmap_bitremap — Apply map defined by a pair of bitmaps to a single bit
bitmap_onto — translate one bitmap relative to another
bitmap_fold — fold larger bitmap into smaller, modulo specified size
bitmap_find_free_region — find a contiguous aligned mem region
bitmap_release_region — release allocated bitmap region
bitmap_allocate_region — allocate bitmap region
bitmap_pos_to_ord
bitmap_ord_to_pos