File: libbitmask.3

package info (click to toggle)
libbitmask 2.0-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 588 kB
  • ctags: 152
  • sloc: sh: 786; ansic: 477; makefile: 58
file content (106 lines) | stat: -rw-r--r-- 4,822 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
.TH LIBBITMASK 3 2006-05-25 "Silicon Graphics, Inc" "SGI" \" -*- nroff -*-
.SH NAME
bitmask,
bitmask_alloc, bitmask_free, bitmask_displayhex,
bitmask_displaylist, bitmask_parsehex, bitmask_parselist,
bitmask_copy, bitmask_setall, bitmask_clearall, bitmask_nbytes,
bitmask_mask, bitmask_nbits, bitmask_weight, bitmask_isbitset,
bitmask_isbitclear, bitmask_isallset, bitmask_isallclear,
bitmask_setbit, bitmask_clearbit, bitmask_equal, bitmask_subset,
bitmask_disjoint, bitmask_intersects, bitmask_setrange,
bitmask_clearrange, bitmask_keeprange, bitmask_complement,
bitmask_shiftright, bitmask_shiftleft, bitmask_and,
bitmask_andnot, bitmask_or, bitmask_eor, bitmask_first,
bitmask_next, bitmask_rel_to_abs_pos, bitmask_abs_to_rel_pos,
bitmask_last
 \- Dynamically sized multi-word bit masks.
.SH SYNOPSIS
.nf
.B #include <bitmask.h>
.sp
.B cc ... -lbitmask
.sp

.SS Allocate and free `struct bitmask *`:
.nf
.RI "struct bitmask *bitmask_alloc(unsigned int " nbits ");"
.RI "void bitmask_free(struct bitmask *" bmp ");"

.SS Display and parse ascii string representations:
.nf
.RI "int bitmask_displayhex(char *" buf ", int " len ", const struct bitmask *" bmp ");"
.RI "int bitmask_displaylist(char *" buf ", int " len ", const struct bitmask *" bmp ");"
.RI "int bitmask_parsehex(const char *" buf ", struct bitmask *" bmp ");"
.RI "int bitmask_parselist(const char *" buf ", struct bitmask *" bmp ");"

.SS Basic initialization operations:
.nf
.RI "struct bitmask *bitmask_copy(struct bitmask *" bmp1 ", const bitmask *" bmp2 ");"
.RI "struct bitmask *bitmask_setall(struct bitmask *" bmp ");"
.RI "struct bitmask *bitmask_clearall(struct bitmask *" bmp ");"

.SS Interface to kernel sched_{set,get}affinity system calls:
.nf
.RI "unsigned int bitmask_nbytes(struct bitmask *" bmp ");"
.RI "unsigned long *bitmask_mask(struct bitmask *" bmp ");"

.SS Unary numeric queries:
.nf
.RI "unsigned int bitmask_nbits(const struct bitmask *" bmp ");"
.RI "unsigned int bitmask_weight(const struct bitmask *" bmp ");"

.SS Unary Boolean queries:
.nf
.RI "int bitmask_isbitset(const struct bitmask *" bmp ", unsigned int " i ");"
.RI "int bitmask_isbitclear(const struct bitmask *" bmp ", unsigned int " i ");"
.RI "int bitmask_isallset(const struct bitmask *" bmp ");"
.RI "int bitmask_isallclear(const struct bitmask *" bmp ");"

.SS Single bit operations:
.nf
.RI "struct bitmask *bitmask_setbit(struct bitmask *" bmp ", unsigned int " i ");"
.RI "struct bitmask *bitmask_clearbit(struct bitmask *" bmp ", unsigned int " i ");"

.SS Binary Boolean operations: bmp1 op? bmp2:
.nf
.RI "int bitmask_equal(const struct bitmask *" bmp1 ", const bitmask *" bmp2 ");"
.RI "int bitmask_subset(const struct bitmask *" bmp1 ", const bitmask *" bmp2 ");"
.RI "int bitmask_disjoint(const struct bitmask *" bmp1 ", const bitmask *" bmp2 ");"
.RI "int bitmask_intersects(const struct bitmask *" bmp1 ", const bitmask *" bmp2 ");"

.SS Range operations:
.nf
.RI "struct bitmask *bitmask_setrange(struct bitmask *" bmp ", unsigned int " i ", unsigned int " j ");"
.RI "struct bitmask *bitmask_clearrange(struct bitmask *" bmp ", unsigned int " i ", unsigned int " j ");"
.RI "struct bitmask *bitmask_keeprange(struct bitmask *" bmp ", unsigned int " i ", unsigned int " j ");"

.SS Unary operations:
.nf
.RI "struct bitmask *bitmask_complement(struct bitmask *" bmp1 ", const bitmask *" bmp2 ");"
.RI "struct bitmask *bitmask_shiftright(struct bitmask *" bmp1 ", const bitmask *" bmp2 ", unsigned int " n ");"
.RI "struct bitmask *bitmask_shiftleft(struct bitmask *" bmp1 ", const bitmask *" bmp2 ", unsigned int " n ");"

.SS Binary operations:
.nf
.RI "struct bitmask *bitmask_and(struct bitmask *" bmp1 ", const bitmask *" bmp2 ", const bitmask *" bmp3 ");"
.RI "struct bitmask *bitmask_andnot(struct bitmask *" bmp1 ", const bitmask *" bmp2 ", const bitmask *" bmp3 ");"
.RI "struct bitmask *bitmask_or(struct bitmask *" bmp1 ", const bitmask *" bmp2 ", const bitmask *" bmp3 ");"
.RI "struct bitmask *bitmask_eor(struct bitmask *" bmp1 ", const bitmask *" bmp2 ", const bitmask *" bmp3 ");"

.SS Iteration operators:
.nf
.RI "int bitmask_first(const struct bitmask *" bmp ");"
.RI "unsigned int bitmask_next(const struct bitmask *" bmp ", unsigned int " i ");"
.RI "unsigned int bitmask_rel_to_abs_pos(const struct bitmask *" bmp ", unsigned int " n ");"
.RI "unsigned int bitmask_abs_to_rel_pos(const struct bitmask *" bmp ", unsigned int " n ");"
.RI "unsigned int bitmask_last(const struct bitmask *" bmp ");"
.fi
.SH DESCRIPTION
See further /usr/share/doc/packages/libbitmask/libbitmask.html.
This document is also available in plain text format as
/usr/share/doc/packages/libbitmask/libbitmask.txt.
.SH SEE ALSO
\fBcpuset\fP(1), \fBlibcpuset\fP(3),
\fBbootcpuset.conf\fP(5), \fBbootcpuset\fP(8).
.SH AUTHOR
pj@sgi.com (Paul Jackson)