]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Explain a bit more about branch prediction in the unit-test case
authorNick Mathewson <nickm@torproject.org>
Mon, 15 Oct 2018 14:16:34 +0000 (10:16 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 15 Oct 2018 14:16:34 +0000 (10:16 -0400)
src/common/util_bug.h

index 22ec37d38f9e07d0171fe21ab2c01dc3986eb1d1..f3e5b7c963fd4fcb46b6717605475e92e1d01727 100644 (file)
  * and then passed right to a conditional.  If you do anything else to the
  * expression here, or introduce any more parentheses, the compiler won't
  * help you.
+ *
+ * We only do this for the unit-test build case because it interferes with
+ * the likely-branch labeling.  Note below that in the other case, we define
+ * these macros to just be synonyms for PREDICT_(UN)LIKELY.
  */
 #define ASSERT_PREDICT_UNLIKELY_(e)             \
   ({                                            \