summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/sempost.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-07-24 09:00:18 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-07-25 10:07:42 +0200
commita1f7d7d430466fe66ead3155a9015ddde237fd44 (patch)
tree345c928410b1a7216b48473f4792742389b540e1 /cpukit/posix/src/sempost.c
parent_SMP_Start_multitasking_on_secondary_processor() (diff)
downloadrtems-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/posix/src/sempost.c')
-rw-r--r--cpukit/posix/src/sempost.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpukit/posix/src/sempost.c b/cpukit/posix/src/sempost.c
index de0ae71fc7..d750c1178c 100644
--- a/cpukit/posix/src/sempost.c
+++ b/cpukit/posix/src/sempost.c
@@ -40,13 +40,13 @@ int sem_post( sem_t *_sem )
heads = sem->Queue.Queue.heads;
count = sem->count;
- if ( __predict_true( heads == NULL && count < SEM_VALUE_MAX ) ) {
+ if ( RTEMS_PREDICT_TRUE( heads == NULL && count < SEM_VALUE_MAX ) ) {
sem->count = count + 1;
_Sem_Queue_release( sem, level, &queue_context );
return 0;
}
- if ( __predict_true( heads != NULL ) ) {
+ if ( RTEMS_PREDICT_TRUE( heads != NULL ) ) {
const Thread_queue_Operations *operations;
Thread_Control *first;