Dynalib Utils
Macros
BitManip.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SET_BITS(value, bits)   ((value) |= (bits))
 
#define CLEAR_BITS(value, bits)   ((value) &= ~(bits))
 
#define IS_ALL_SET(value, bits)   (((value) & (bits)) == (bits))
 
#define IS_ANY_SET(value, bits)   (((value) & (bits)) != 0)
 
#define IS_ALL_CLEAR(value, bits)   (((value) & (bits)) == 0)
 
#define IS_ANY_CLEAR(value, bits)   (!IS_ALL_SET(value, bits) && IS_ANY_SET(value, bits))
 

Macro Definition Documentation

◆ CLEAR_BITS

#define CLEAR_BITS (   value,
  bits 
)    ((value) &= ~(bits))

◆ IS_ALL_CLEAR

#define IS_ALL_CLEAR (   value,
  bits 
)    (((value) & (bits)) == 0)

◆ IS_ALL_SET

#define IS_ALL_SET (   value,
  bits 
)    (((value) & (bits)) == (bits))

◆ IS_ANY_CLEAR

#define IS_ANY_CLEAR (   value,
  bits 
)    (!IS_ALL_SET(value, bits) && IS_ANY_SET(value, bits))

◆ IS_ANY_SET

#define IS_ANY_SET (   value,
  bits 
)    (((value) & (bits)) != 0)

◆ SET_BITS

#define SET_BITS (   value,
  bits 
)    ((value) |= (bits))