#3475 closed enhancement (fixed)

Add RTEMS_PREDICT_TRUE() and RTEMS_PREDICT_FALSE() for static branch prediction hints

Reported by: Sebastian Huber Owned by: Sebastian Huber
Priority: normal Milestone: 5.1
Component: score Version: 5
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description (last modified by Sebastian Huber)

Add macros to <rtems/score/basedefs.h> for the GNU extension builtin_expect(). Use RTEMS_PREDICT_TRUE() and RTEMS_PREDICT_FALSE() similar to the FreeBSD predict_true() and predict_false(). Alternatives are the Linux likely() and unlikely() or directly the GCC builtin_expect(), however, the FreeBSD names seem to be the most easy to understand.

Change History (2)

comment:1 Changed on Jul 24, 2018 at 6:52:30 AM by Sebastian Huber

Description: modified (diff)

comment:2 Changed on Jul 25, 2018 at 8:10:04 AM by Sebastian Huber <sebastian.huber@…>

Resolution: fixed
Status: assignedclosed

In a1f7d7d/rtems:

score: RTEMS_PREDICT_TRUE(), RTEMS_PREDICT_FALSE()

Add RTEMS_PREDICT_TRUE() and RTEMS_PREDICT_FALSE() for static branch
prediction hints.

Close #3475.

Note: See TracTickets for help on using tickets.