Chapter 3. Basic Kernel Library Functions

Table of Contents

Bitmap Operations
Command-line Parsing
CRC Functions
idr/ida 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_find_next_zero_area_off — find a contiguous aligned zero area
__bitmap_parse — convert an ASCII hex string into a bitmap.
bitmap_parse_user — convert an ASCII hex string in a user buffer into a bitmap
bitmap_print_to_pagebuf — convert bitmap to list or hex format ASCII string
bitmap_parselist_user
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_copy_le — copy a bitmap, putting the bits into little-endian order.
__bitmap_parselist — convert list format ASCII string to bitmap
bitmap_pos_to_ord — find ordinal of set bit at given position in bitmap
bitmap_ord_to_pos — find position of n-th set bit in bitmap