Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
df81b97b
Commit
df81b97b
authored
Dec 31, 2007
by
Michael Beck
Browse files
added rbitset_clear_all()
[r17121]
parent
cada429b
Changes
1
Show whitespace changes
Inline
Side-by-side
include/libfirm/adt/raw_bitset.h
View file @
df81b97b
...
...
@@ -55,7 +55,7 @@ typedef unsigned int rawbs_base_t;
/**
* Allocate an empty raw bitset on the heap.
*
* @param size
element size of
the bitset
* @param size
number of bits in
the bitset
*
* @return the new bitset
*/
...
...
@@ -71,7 +71,7 @@ static INLINE unsigned *rbitset_malloc(unsigned size) {
* Allocate an empty raw bitset on the stack.
*
* @param res will contain the newly allocated bitset
* @param size
element size of
the bitset
* @param size
number of bits in
the bitset
*/
#define rbitset_alloca(res, size) \
do { \
...
...
@@ -84,7 +84,7 @@ do { \
* Allocate an empty raw bitset on an obstack.
*
* @param obst the obstack where the bitset is allocated on
* @param size
element size of
the bitset
* @param size
number of bits in
the bitset
*
* @return the new bitset
*/
...
...
@@ -101,7 +101,7 @@ static INLINE unsigned *rbitset_obstack_alloc(struct obstack *obst, unsigned siz
* The size of this bitset can be accessed by bitset[-1].
*
* @param obst the obstack where the bitset is allocated on
* @param size
element size of
the bitset
* @param size
number of bits in
the bitset
*
* @return the new bitset
*/
...
...
@@ -123,7 +123,7 @@ static INLINE unsigned *rbitset_w_size_obstack_alloc(struct obstack *obst, unsig
*
* @param obst the obstack where the bitset is allocated on
* @param old_bitset the bitset to be duplicated
* @param size
element size of
the bitset
* @param size
number of bits in
the bitset
*
* @return the new bitset
*/
...
...
@@ -169,6 +169,17 @@ static INLINE void rbitset_clear(unsigned *bitset, unsigned pos) {
BITSET_ELEM
(
bitset
,
pos
)
&=
~
(
1
<<
(
pos
%
BITS_PER_ELEM
));
}
/**
* Clear all bits in a given bitset.
*
* @param bitset the bitset
* @param size number of bits in the bitset
*/
static
INLINE
void
rbitset_clear_all
(
unsigned
*
bitset
,
unsigned
size
)
{
unsigned
size_bytes
=
BITSET_SIZE_BYTES
(
size
);
memset
(
bitset
,
0
,
size_bytes
);
}
/**
* Check if a bit is set at position pos.
*
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment