Skip to content
  • Philippe Gerum's avatar
    lib: remove remaining likely/unlikely branch annotations · d9ff7382
    Philippe Gerum authored and Jan Kiszka's avatar Jan Kiszka committed
    
    
    In user-space at least, we'd be better off trusting the CPU's branch
    predictor, instead of relying on our limited perception when it comes
    to determining the likeliness of a condition, or every compiler to do
    the right thing with respect to efficient branching.
    
    We only have a few unlikely predictions in-tree on straightforward
    conditions, which we can remove safely:
    
    - POSIX condvars wait/signal loops on x86, arm and arm64 showed no
      observable performance penalty.
    
    - other callers from the thread cancellation path, or debug
      instrumentation are slow paths in essence anyway.
    
    Signed-off-by: default avatarPhilippe Gerum <rpm@xenomai.org>
    Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
    d9ff7382