Changeset 3bf4a9fa in rtems


Ignore:
Timestamp:
Apr 20, 2015, 6:52:52 AM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
413b9e28
Parents:
4db0ae8e
git-author:
Sebastian Huber <sebastian.huber@…> (04/20/15 06:52:52)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/21/15 06:25:31)
Message:

score: _Objects_Get_isr_disable()

Do not disable thread dispatching and do not acquire the Giant lock.
This makes it possible to use this object get variant for fine grained
locking.

Update #2273.

Location:
cpukit
Files:
4 edited

Legend:

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

    r4db0ae8e r3bf4a9fa  
    5555
    5656    case OBJECTS_LOCAL:
     57#if defined(RTEMS_SMP)
     58      _Thread_Dispatch_disable();
     59#endif
    5760      executing = _Thread_Executing;
    5861      _CORE_mutex_Seize(
     
    6467        &lock_context
    6568      );
     69#if defined(RTEMS_SMP)
     70      _Thread_Enable_dispatch();
     71#endif
    6672      _Objects_Put_for_get_isr_disable( &the_mutex->Object );
    6773      return _POSIX_Mutex_Translate_core_mutex_return_code(
  • cpukit/rtems/src/semobtain.c

    r4db0ae8e r3bf4a9fa  
    5757      wait = !_Options_Is_no_wait( option_set );
    5858#if defined(RTEMS_SMP)
     59      _Thread_Disable_dispatch();
    5960      if ( _Attributes_Is_multiprocessor_resource_sharing( attribute_set ) ) {
    6061        MRSP_Status mrsp_status;
     
    6768          timeout
    6869        );
     70        _Thread_Enable_dispatch();
    6971        _Objects_Put_for_get_isr_disable( &the_semaphore->Object );
    7072        return _Semaphore_Translate_MRSP_status_code( mrsp_status );
     
    8082          &lock_context
    8183        );
     84#if defined(RTEMS_SMP)
     85        _Thread_Enable_dispatch();
     86#endif
    8287        _Objects_Put_for_get_isr_disable( &the_semaphore->Object );
    8388        return _Semaphore_Translate_core_mutex_return_code(
     
    9499        &lock_context
    95100      );
     101#if defined(RTEMS_SMP)
     102      _Thread_Enable_dispatch();
     103#endif
    96104      _Objects_Put_for_get_isr_disable( &the_semaphore->Object );
    97105      return _Semaphore_Translate_core_semaphore_return_code(
  • cpukit/score/include/rtems/score/objectimpl.h

    r4db0ae8e r3bf4a9fa  
    10941094{
    10951095  (void) the_object;
    1096 #if defined(RTEMS_SMP)
    1097   _Thread_Enable_dispatch();
    1098 #endif
    10991096}
    11001097
  • cpukit/score/src/objectgetisr.c

    r4db0ae8e r3bf4a9fa  
    3434
    3535  if ( information->maximum >= index ) {
    36 #if defined(RTEMS_SMP)
    37     _Thread_Disable_dispatch();
    38 #endif
    3936    _ISR_lock_ISR_disable( lock_context );
    4037    if ( (the_object = information->local_table[ index ]) != NULL ) {
     
    4340    }
    4441    _ISR_lock_ISR_enable( lock_context );
    45 #if defined(RTEMS_SMP)
    46     _Thread_Enable_dispatch();
    47 #endif
    4842    *location = OBJECTS_ERROR;
    4943    return NULL;
Note: See TracChangeset for help on using the changeset viewer.