Changeset a1f7d7d in rtems for cpukit/posix


Ignore:
Timestamp:
Jul 24, 2018, 7:00:18 AM (18 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
5677883
Parents:
406dd62
git-author:
Sebastian Huber <sebastian.huber@…> (07/24/18 07:00:18)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/25/18 08:07:42)
Message:

score: RTEMS_PREDICT_TRUE(), RTEMS_PREDICT_FALSE()

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

Close #3475.

Location:
cpukit/posix/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/posix/src/sempost.c

    r406dd62 ra1f7d7d  
    4141  count = sem->count;
    4242
    43   if ( __predict_true( heads == NULL && count < SEM_VALUE_MAX ) ) {
     43  if ( RTEMS_PREDICT_TRUE( heads == NULL && count < SEM_VALUE_MAX ) ) {
    4444    sem->count = count + 1;
    4545    _Sem_Queue_release( sem, level, &queue_context );
     
    4747  }
    4848
    49   if ( __predict_true( heads != NULL ) ) {
     49  if ( RTEMS_PREDICT_TRUE( heads != NULL ) ) {
    5050    const Thread_queue_Operations *operations;
    5151    Thread_Control *first;
  • cpukit/posix/src/semtimedwait.c

    r406dd62 ra1f7d7d  
    4747
    4848  count = sem->count;
    49   if ( __predict_true( count > 0 ) ) {
     49  if ( RTEMS_PREDICT_TRUE( count > 0 ) ) {
    5050    sem->count = count - 1;
    5151    _Sem_Queue_release( sem, level, &queue_context );
  • cpukit/posix/src/semtrywait.c

    r406dd62 ra1f7d7d  
    3636
    3737  count = sem->count;
    38   if ( __predict_true( count > 0 ) ) {
     38  if ( RTEMS_PREDICT_TRUE( count > 0 ) ) {
    3939    sem->count = count - 1;
    4040    _Sem_Queue_release( sem, level, &queue_context );
Note: See TracChangeset for help on using the changeset viewer.