ck_bitmap_next(3)

ck_bitmap_next3

Iterate to the next set bit in bitmap

Usage

#include <ck_bitmap.h>

bool

ck_bitmap_next(ck_bitmap_t *bitmap, ck_bitmap_iterator_t iterator, unsigned int *bit);

Library

Concurrency Kit (libck, -lck)

Overview

The ck_bitmap_next() function will increment the iterator object pointed to by iterator to point to the next set bit in the bitmap. If ck_bitmap_next() returns true then the pointer pointed to by bit is initialized to the number of the current set bit pointed to by the iterator object.

It is expected that iterator has been initialized using the ck_bitmap_iterator_init(3) function.

Return values

If ck_bitmap_next() returns true then the object pointed to by bit contains a set bit. If ck_bitmap_next() returns false then value of the object pointed to by bit is undefined.

Errors

Behavior is undefined if iterator or bitmap are uninitialized.

Releases

5 releases since Debian 8 (Jessie); the text changed 1 time.

  1. 8
  2. 9–13

From libck-dev 0.7.2-6 in Debian 13 (Trixie). Parsed by carta from the page's mdoc source.