git: 613d66b5e17d - main - queue(3): Wrap QMD_ASSERT()'s guard with __predict_false()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 28 Apr 2025 12:23:44 UTC
The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=613d66b5e17d92e5304fdc9abe4c62ba015ebf31 commit 613d66b5e17d92e5304fdc9abe4c62ba015ebf31 Author: Olivier Certner <olce@FreeBSD.org> AuthorDate: 2025-04-22 14:26:22 +0000 Commit: Olivier Certner <olce@FreeBSD.org> CommitDate: 2025-04-28 12:19:43 +0000 queue(3): Wrap QMD_ASSERT()'s guard with __predict_false() Such a guard is bound to be almost always false (obviously). Reviewed by: emaste (older version) MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49974 --- sys/sys/queue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/queue.h b/sys/sys/queue.h index b4814706cb76..a29ad6b94f03 100644 --- a/sys/sys/queue.h +++ b/sys/sys/queue.h @@ -208,7 +208,7 @@ struct qm_trace { #ifndef QMD_ASSERT #define QMD_ASSERT(expression, fmt, ...) do { \ - if (!(expression)) \ + if (__predict_false(!(expression))) \ QMD_PANIC("%s:%u: %s: " fmt, \ __FILE__, __LINE__, __func__, ##__VA_ARGS__); \ } while (0)