diff options
author | hselasky <hselasky@FreeBSD.org> | 2016-05-27 07:33:49 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2016-05-27 07:33:49 +0000 |
commit | 80f7038dc0fa7ad6798fab2a2fffca92d42c920b (patch) | |
tree | 65dd27d45c2db66bbe6a7bd64aa4b6de01fe0697 /sys/compat/linuxkpi | |
parent | 99dd54c8161f3c182c8e3b322f2cd97be31c6f36 (diff) | |
download | FreeBSD-src-80f7038dc0fa7ad6798fab2a2fffca92d42c920b.zip FreeBSD-src-80f7038dc0fa7ad6798fab2a2fffca92d42c920b.tar.gz |
The SCHEDULER_STOPPED() macro already contains a predict false statement.
Remove superfluous unlikely() wrapper.
Suggested by: glebius
MFC after: 1 week
Sponsored by: Mellanox Technologies
Diffstat (limited to 'sys/compat/linuxkpi')
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/wait.h | 6 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/src/linux_compat.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/wait.h b/sys/compat/linuxkpi/common/include/linux/wait.h index 9624c84..7ae6464 100644 --- a/sys/compat/linuxkpi/common/include/linux/wait.h +++ b/sys/compat/linuxkpi/common/include/linux/wait.h @@ -82,7 +82,7 @@ do { \ void *c = &(q).wchan; \ if (!(cond)) { \ for (;;) { \ - if (unlikely(SCHEDULER_STOPPED())) \ + if (SCHEDULER_STOPPED()) \ break; \ sleepq_lock(c); \ if (cond) { \ @@ -103,7 +103,7 @@ do { \ _error = 0; \ if (!(cond)) { \ for (; _error == 0;) { \ - if (unlikely(SCHEDULER_STOPPED())) \ + if (SCHEDULER_STOPPED()) \ break; \ sleepq_lock(c); \ if (cond) { \ @@ -128,7 +128,7 @@ do { \ \ if (!(cond)) { \ for (; __rc == 0;) { \ - if (unlikely(SCHEDULER_STOPPED())) \ + if (SCHEDULER_STOPPED()) \ break; \ sleepq_lock(c); \ if (cond) { \ diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index ae72213..d1011f6 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -1096,7 +1096,7 @@ linux_complete_common(struct completion *c, int all) long linux_wait_for_common(struct completion *c, int flags) { - if (unlikely(SCHEDULER_STOPPED())) + if (SCHEDULER_STOPPED()) return (0); if (flags != 0) @@ -1128,7 +1128,7 @@ linux_wait_for_timeout_common(struct completion *c, long timeout, int flags) { long end = jiffies + timeout; - if (unlikely(SCHEDULER_STOPPED())) + if (SCHEDULER_STOPPED()) return (0); if (flags != 0) |