From a1f7d7d430466fe66ead3155a9015ddde237fd44 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 24 Jul 2018 09:00:18 +0200 Subject: score: RTEMS_PREDICT_TRUE(), RTEMS_PREDICT_FALSE() Add RTEMS_PREDICT_TRUE() and RTEMS_PREDICT_FALSE() for static branch prediction hints. Close #3475. --- cpukit/score/src/condition.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cpukit/score/src/condition.c') 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; } -- cgit v1.2.3