Re: [PATCH] scripts: coccinelle: check for !(un)?likely usage
From: Denis Efremov
Date: Wed Aug 28 2019 - 08:41:48 EST
>
> As a human I am confused. Is !likely(x) equivalent to x or !x?
>
> Julia
>
As far as I could understand it:
# define likely(x) __builtin_expect(!!(x), 1)
!likely(x)
!__builtin_expect(!!(x), 1)
!((!!(x)) == 1)
(!!(x)) != 1, since !! could result in 0 or 1
(!!(x)) == 0
!(!!(x))
!!!(x)
!(x)
Thanks,
Denis