Ignore:
Timestamp:
Apr 18, 2016, 4:23:27 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
ca18cb59
Parents:
928d455
git-author:
Sebastian Huber <sebastian.huber@…> (04/18/16 04:23:27)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/21/16 05:29:38)
Message:

score: Fix _CORE_semaphore_Flush()

Use proper CORE_semaphore_Status for _CORE_semaphore_Flush() and
_CORE_semaphore_Destroy() operations.

Close #2696.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/include/rtems/score/coresemimpl.h

    r928d455 r90f1265  
    8787);
    8888
    89 RTEMS_INLINE_ROUTINE void _CORE_semaphore_Destroy(
    90   CORE_semaphore_Control *the_semaphore
    91 )
    92 {
    93   _Thread_queue_Destroy( &the_semaphore->Wait_queue );
    94 }
     89#define _CORE_semaphore_Destroy( \
     90  the_semaphore, \
     91  mp_callout, \
     92  mp_id \
     93) \
     94  do { \
     95    _Thread_queue_Flush( \
     96      &( the_semaphore )->Wait_queue, \
     97      ( the_semaphore )->operations, \
     98      CORE_SEMAPHORE_WAS_DELETED, \
     99      mp_callout, \
     100      mp_id \
     101    ); \
     102    _Thread_queue_Destroy( &( the_semaphore )->Wait_queue ); \
     103  } while ( 0 )
    95104
    96105RTEMS_INLINE_ROUTINE CORE_semaphore_Status _CORE_semaphore_Do_surrender(
     
    181190#define _CORE_semaphore_Flush( \
    182191  the_semaphore, \
    183   status, \
    184192  mp_callout, \
    185193  mp_id \
     
    188196    &( the_semaphore )->Wait_queue, \
    189197    ( the_semaphore )->operations, \
    190     status, \
     198    CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT, \
    191199    mp_callout, \
    192200    mp_id \
Note: See TracChangeset for help on using the changeset viewer.