feat(kernel): add hot and cold attributes to optimize function performance

Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
2025-03-22 03:04:23 +00:00
parent f9476d8c57
commit d06b6d3270
5 changed files with 20 additions and 17 deletions

View File

@ -458,6 +458,9 @@ typedef uint48_t uint_fast48_t;
#define likely(x) __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)
#define hot __attribute__((hot))
#define cold __attribute__((cold))
#define NoSecurityAnalysis __no_stack_protector __no_sanitize_address __no_sanitize_undefined __no_sanitize_thread
#define nsa NoSecurityAnalysis