Debian Codegraph @

doc/ck_bitmap_next

raw
1 .\"
2 .\" Copyright 2012-2013 Samy Al Bahra.
3 .\" Copyright 2012-2013 Shreyas Prasad.
4 .\" All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\"
15 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
16 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
19 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 .\" SUCH DAMAGE.
26 .\"
27 .\"
28 .Dd April 27, 2012
29 .Dt CK_BITMAP_TEST 3
30 .Sh NAME
31 .Nm ck_bitmap_next
32 .Nd iterate to the next set bit in bitmap
33 .Sh LIBRARY
34 Concurrency Kit (libck, \-lck)
35 .Sh SYNOPSIS
36 .In ck_bitmap.h
37 .Ft bool
38 .Fn ck_bitmap_next "ck_bitmap_t *bitmap" "ck_bitmap_iterator_t iterator" "unsigned int *bit"
39 .Sh DESCRIPTION
40 The
41 .Fn ck_bitmap_next
42 function will increment the iterator object pointed to by
43 .Fa iterator
44 to point to the next set bit in the bitmap. If
45 .Fn ck_bitmap_next
46 returns
47 .Dv true
48 then the pointer pointed to by
49 .Fa bit
50 is initialized to the number of the current set bit pointed to by the
51 .Fa iterator
52 object.
53 .Pp
54 It is expected that
55 .Fa iterator
56 has been initialized using the
57 .Xr ck_bitmap_iterator_init 3
58 function.
59 .Sh RETURN VALUES
60 If
61 .Fn ck_bitmap_next
62 returns
63 .Dv true
64 then the object pointed to by
65 .Fa bit
66 contains a set bit. If
67 .Fn ck_bitmap_next
68 returns
69 .Dv false
70 then value of the object pointed to by
71 .Fa bit
72 is undefined.
73 .Sh ERRORS
74 Behavior is undefined if
75 .Fa iterator
76 or
77 .Fa bitmap
78 are uninitialized.
79 .Sh SEE ALSO
80 .Xr ck_bitmap_base 3 ,
81 .Xr ck_bitmap_size 3 ,
82 .Xr ck_bitmap_init 3 ,
83 .Xr ck_bitmap_set 3 ,
84 .Xr ck_bitmap_reset 3 ,
85 .Xr ck_bitmap_clear 3 ,
86 .Xr ck_bitmap_bits 3 ,
87 .Xr ck_bitmap_buffer 3 ,
88 .Xr ck_bitmap_iterator_init 3
89 .Pp
90 Additional information available at http://concurrencykit.org/