Changeset 8a77ef63 in rtems


Ignore:
Timestamp:
May 27, 2016, 7:34:17 AM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
3c1ad257
Parents:
09c5ca4
git-author:
Sebastian Huber <sebastian.huber@…> (05/27/16 07:34:17)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/30/16 14:16:22)
Message:

rtems: Simplify rtems_semaphore_flush()

Due to the unified status codes, we can now use a common flush method
for semaphore and mutex variants.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/src/semflush.c

    r09c5ca4 r8a77ef63  
    5656      return RTEMS_NOT_DEFINED;
    5757#endif
    58     case SEMAPHORE_VARIANT_MUTEX:
    59       _CORE_mutex_Flush(
    60         &the_semaphore->Core_control.mutex,
    61         _Thread_queue_Flush_status_unavailable,
    62         &queue_context
    63       );
    64       break;
    6558    default:
    6659      _Assert(
    67         the_semaphore->variant == SEMAPHORE_VARIANT_SIMPLE_BINARY
     60        the_semaphore->variant == SEMAPHORE_VARIANT_MUTEX
     61          || the_semaphore->variant == SEMAPHORE_VARIANT_SIMPLE_BINARY
    6862          || the_semaphore->variant == SEMAPHORE_VARIANT_COUNTING
    6963      );
    70       _CORE_semaphore_Flush(
    71         &the_semaphore->Core_control.semaphore,
     64      _Thread_queue_Flush_critical(
     65        &the_semaphore->Core_control.Wait_queue.Queue,
    7266        _Semaphore_Get_operations( the_semaphore ),
     67        _Thread_queue_Flush_status_unavailable,
    7368        &queue_context
    7469      );
Note: See TracChangeset for help on using the changeset viewer.