Changeset 54e9216 in rtems


Ignore:
Timestamp:
Jun 5, 2013, 9:48:28 AM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
2d2352b
Parents:
c398c66
git-author:
Sebastian Huber <sebastian.huber@…> (06/05/13 09:48:28)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/07/13 15:06:38)
Message:

score: Add _Objects_Put_for_get_isr_disable()

Provide SMP support. The ISR disable/enable is not enough to ensure
mutual exclusion for SMP configurations.

Location:
cpukit
Files:
4 edited

Legend:

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

    rc398c66 r54e9216  
    6060        level
    6161      );
     62      _Objects_Put_for_get_isr_disable( &the_mutex->Object );
    6263      return _POSIX_Mutex_Translate_core_mutex_return_code(
    6364        (CORE_mutex_Status) _Thread_Executing->Wait.return_code
  • cpukit/rtems/src/semobtain.c

    rc398c66 r54e9216  
    6161          level
    6262        );
     63        _Objects_Put_for_get_isr_disable( &the_semaphore->Object );
    6364        return _Semaphore_Translate_core_mutex_return_code(
    6465                  _Thread_Executing->Wait.return_code );
     
    7374        level
    7475      );
     76      _Objects_Put_for_get_isr_disable( &the_semaphore->Object );
    7577      return _Semaphore_Translate_core_semaphore_return_code(
    7678                  _Thread_Executing->Wait.return_code );
  • cpukit/score/inline/rtems/score/object.inl

    rc398c66 r54e9216  
    376376
    377377#endif
     378
     379/**
     380 * @brief Puts back an object obtained with _Objects_Get_isr_disable().
     381 */
     382RTEMS_INLINE_ROUTINE void _Objects_Put_for_get_isr_disable(
     383  Objects_Control *the_object
     384)
     385{
     386  (void) the_object;
     387#if defined(RTEMS_SMP)
     388  _Thread_Enable_dispatch();
     389#endif
     390}
     391
    378392/* end of include file */
  • cpukit/score/src/objectgetisr.c

    rc398c66 r54e9216  
    4545
    4646  if ( information->maximum >= index ) {
     47#if defined(RTEMS_SMP)
     48    _Thread_Disable_dispatch();
     49#endif
    4750    _ISR_Disable( level );
    4851    if ( (the_object = information->local_table[ index ]) != NULL ) {
     
    5255    }
    5356    _ISR_Enable( level );
     57#if defined(RTEMS_SMP)
     58    _Thread_Enable_dispatch();
     59#endif
    5460    *location = OBJECTS_ERROR;
    5561    return NULL;
Note: See TracChangeset for help on using the changeset viewer.