Extra kernel utilities.
More...
Go to the source code of this file.
|
| #define | ROR(x, y) |
| #define | ROL(x, y) |
|
| static unsigned | ror (const unsigned x, const unsigned y) |
| | Rotates a 32-bit value right by a specified number of bits.
|
| static unsigned | rol (const unsigned x, const unsigned y) |
| | Rotates a 32-bit value left by a specified number of bits.
|
Extra kernel utilities.
- Author
- Matheus Boscariol
- Since
- 15/11/2026
- Copyright
- (c) 2026 Matheus Boscariol. Licensed under GNU AGPL-3.0.
Definition in file tools.h.
◆ ROL
Value:(((unsigned)(x) << (y)) | ((unsigned)(x) >> (32 - (y))))
Definition at line 13 of file tools.h.
◆ ROR
Value:(((unsigned)(x) >> (y)) | ((unsigned)(x) << (32 - (y))))
Definition at line 12 of file tools.h.
◆ rol()
| unsigned rol |
( |
const unsigned | x, |
|
|
const unsigned | y ) |
|
inlinestatic |
Rotates a 32-bit value left by a specified number of bits.
- Parameters
-
| x | The value to rotate |
| y | The number of bits to rotate by |
- Returns
- The rotated value
Definition at line 32 of file tools.h.
◆ ror()
| unsigned ror |
( |
const unsigned | x, |
|
|
const unsigned | y ) |
|
inlinestatic |
Rotates a 32-bit value right by a specified number of bits.
- Parameters
-
| x | The value to rotate |
| y | The number of bits to rotate by |
- Returns
- The rotated value
Definition at line 21 of file tools.h.