mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-07-27 09:05:21 -04:00
use a consistent style for fixed-size int types
The stdint.h types don't cover 128-bit integers and the underscore makes them ill suited to usage in function suffixes. Instead, use the common naming style in the Linux kernel and elsewhere including the ChaCha8 implementation included here.
This commit is contained in:
parent
92a33182fb
commit
dcd969ae04
6 changed files with 44 additions and 43 deletions
7
util.h
7
util.h
|
@ -1,6 +1,7 @@
|
|||
#ifndef UTIL_H
|
||||
#define UTIL_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdnoreturn.h>
|
||||
|
||||
#define likely(x) __builtin_expect(!!(x), 1)
|
||||
|
@ -19,4 +20,10 @@ static inline int ffzl(long x) {
|
|||
|
||||
COLD noreturn void fatal_error(const char *s);
|
||||
|
||||
typedef uint8_t u8;
|
||||
typedef uint16_t u16;
|
||||
typedef uint32_t u32;
|
||||
typedef uint64_t u64;
|
||||
typedef unsigned __int128 u128;
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue