Commit 7fd93cf30c531fd8b014e827e7a85fcfc010b2c6
Committed by
Linus Torvalds
1 parent
863c84b97c
Exists in
master
and in
20 other branches
[PATCH] posix-timers `unlikely' rejig
!unlikely(expr) hurts my brain. likely(!expr) is more straightforward. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff
kernel/posix-cpu-timers.c
... | ... | @@ -497,7 +497,7 @@ |
497 | 497 | left = cputime_div(cputime_sub(expires.cpu, val.cpu), |
498 | 498 | nthreads); |
499 | 499 | do { |
500 | - if (!unlikely(t->flags & PF_EXITING)) { | |
500 | + if (likely(!(t->flags & PF_EXITING))) { | |
501 | 501 | ticks = cputime_add(prof_ticks(t), left); |
502 | 502 | if (cputime_eq(t->it_prof_expires, |
503 | 503 | cputime_zero) || |
... | ... | @@ -512,7 +512,7 @@ |
512 | 512 | left = cputime_div(cputime_sub(expires.cpu, val.cpu), |
513 | 513 | nthreads); |
514 | 514 | do { |
515 | - if (!unlikely(t->flags & PF_EXITING)) { | |
515 | + if (likely(!(t->flags & PF_EXITING))) { | |
516 | 516 | ticks = cputime_add(virt_ticks(t), left); |
517 | 517 | if (cputime_eq(t->it_virt_expires, |
518 | 518 | cputime_zero) || |
... | ... | @@ -527,7 +527,7 @@ |
527 | 527 | nsleft = expires.sched - val.sched; |
528 | 528 | do_div(nsleft, nthreads); |
529 | 529 | do { |
530 | - if (!unlikely(t->flags & PF_EXITING)) { | |
530 | + if (likely(!(t->flags & PF_EXITING))) { | |
531 | 531 | ns = t->sched_time + nsleft; |
532 | 532 | if (t->it_sched_expires == 0 || |
533 | 533 | t->it_sched_expires > ns) { |