mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Improve the reliability of the kernel likely and unlikely macros.
This commit is contained in:
parent
e91cde379a
commit
640465320f
1 changed files with 2 additions and 2 deletions
|
@ -30,8 +30,8 @@
|
|||
|
||||
typedef uintptr_t addr_t;
|
||||
|
||||
#define likely(x) __builtin_expect((x),1)
|
||||
#define unlikely(x) __builtin_expect((x),0)
|
||||
#define likely(x) __builtin_expect(!!(x),1)
|
||||
#define unlikely(x) __builtin_expect(!!(x),0)
|
||||
|
||||
#if !defined(CPU) && defined(__i386__)
|
||||
#define CPU X86
|
||||
|
|
Loading…
Add table
Reference in a new issue