mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-17 12:22:35 +03:00
12 lines
361 B
C
12 lines
361 B
C
|
#ifndef RSBITS_H_INCLUDED
|
||
|
#define RSBITS_H_INCLUDED
|
||
|
|
||
|
#define BIT_SET(var,mask) { var |= (mask); }
|
||
|
#define BIT_CLEAR(var,mask) { var &= ~(mask); }
|
||
|
#define BIT_TOGGLE(var,mask) { var ^= (mask); }
|
||
|
|
||
|
#define IS_BIT_SET(var,mask) ( (var) & (mask) )
|
||
|
#define IS_BIT_CLEARED(var,mask) (!( (var) & (mask) ))
|
||
|
|
||
|
#endif // RSBITS_H_INCLUDED
|