add support for MSRs and basic bitwise ops

This commit is contained in:
Michael Shaw 2023-02-28 18:07:12 -05:00
commit d5ea43e05a
3 changed files with 52 additions and 0 deletions

11
include/kernel/bitwise.h Normal file
View file

@ -0,0 +1,11 @@
#ifndef _BITWISE_H_
#define _BITWISE_H_
#ifndef __ASM__
#define BIT_SET(_v, _bit) ((_v) |= (1 << (_bit)))
#define BIT_CLEAR(_v, _bit) ((_v) &= (~(1 << (_bit))))
#define BIT_FLIP(_v, _bit) ((_v) ^= (1 << (_bit)))
#endif /* __ASM__ */
#endif /* _BITWISE_H_ */