diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-07-24 09:00:18 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-07-25 10:07:42 +0200 |
commit | a1f7d7d430466fe66ead3155a9015ddde237fd44 (patch) | |
tree | 345c928410b1a7216b48473f4792742389b540e1 /cpukit/score/src/condition.c | |
parent | _SMP_Start_multitasking_on_secondary_processor() (diff) | |
download | rtems-a1f7d7d430466fe66ead3155a9015ddde237fd44.tar.bz2 |
score: RTEMS_PREDICT_TRUE(), RTEMS_PREDICT_FALSE()
Add RTEMS_PREDICT_TRUE() and RTEMS_PREDICT_FALSE() for static branch
prediction hints.
Close #3475.
Diffstat (limited to 'cpukit/score/src/condition.c')
-rw-r--r-- | cpukit/score/src/condition.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cpukit/score/src/condition.c b/cpukit/score/src/condition.c index 9913d86d34..892245baf5 100644 --- a/cpukit/score/src/condition.c +++ b/cpukit/score/src/condition.c @@ -279,7 +279,9 @@ static void _Condition_Wake( struct _Condition_Control *_condition, int count ) * In common uses cases of condition variables there are normally no threads * on the queue, so check this condition early. */ - if ( __predict_true( _Thread_queue_Is_empty( &condition->Queue.Queue ) ) ) { + if ( + RTEMS_PREDICT_TRUE( _Thread_queue_Is_empty( &condition->Queue.Queue ) ) + ) { _Condition_Queue_release( condition, &context.Base ); return; } |