Changeset d3802bb5 in rtems


Ignore:
Timestamp:
Apr 20, 2015, 7:50:01 AM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
36413201
Parents:
1041de1
git-author:
Sebastian Huber <sebastian.huber@…> (04/20/15 07:50:01)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/21/15 06:25:32)
Message:

score: Delete object control block ISR lock

The Objects_Control::Lock was a software layer violation. It worked
only for the threads since they are somewhat special.

Update #2273.

Location:
cpukit/score
Files:
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/Makefile.am

    r1041de1 rd3802bb5  
    204204    src/objectnamespaceremove.c \
    205205    src/objectactivecount.c
    206 libscore_a_SOURCES += src/objectacquire.c
    207206
    208207## SCHEDULER_C_FILES
  • cpukit/score/include/rtems/score/object.h

    r1041de1 rd3802bb5  
    2424#include <rtems/score/cpu.h>
    2525#include <rtems/score/chain.h>
    26 #include <rtems/score/isrlock.h>
    2726
    2827#ifdef __cplusplus
     
    238237  /** This is the object's name. */
    239238  Objects_Name   name;
    240   /** This is the object's ISR lock. */
    241   ISR_LOCK_MEMBER( Lock )
    242239} Objects_Control;
    243240
  • cpukit/score/include/rtems/score/objectimpl.h

    r1041de1 rd3802bb5  
    592592
    593593/**
    594  * @brief Acquires an object by its identifier.
    595  *
    596  * This function is similar to _Objects_Get_isr_disable().  It disables
    597  * interrupts and acquires the object specific ISR lock for local objects.
    598  * Thread dispatching is not disabled for local objects.  For remote objects
    599  * thread dispatching is disabled.
    600  *
    601  * @param[in] information The object information.
    602  * @param[in] id The object identifier.
    603  * @param[in] location The location of the object.
    604  * @param[in] lock_context The lock context for local objects.
    605  *
    606  * @retval object The object corresponding to the identifier.
    607  * @retval NULL No object exists in this domain for this identifier.
    608  *
    609  * @see _Objects_ISR_disable_and_acquire(), _Objects_Release(),
    610  *   _Objects_Release_and_ISR_enable(), and
    611  *   _Objects_Release_and_thread_dispatch_disable().
    612  */
    613 Objects_Control *_Objects_Acquire(
    614   const Objects_Information *information,
    615   Objects_Id                 id,
    616   Objects_Locations         *location,
    617   ISR_lock_Context          *lock_context
    618 );
    619 
    620 /**
    621  * @brief Acquires a local object and disables interrupts.
    622  *
    623  * @param[in] the_object The local object to acquire.
    624  * @param[in] lock_context The lock context.
    625  */
    626 RTEMS_INLINE_ROUTINE void _Objects_ISR_disable_and_acquire(
    627   Objects_Control  *the_object,
    628   ISR_lock_Context *lock_context
    629 )
    630 {
    631   _ISR_lock_ISR_disable_and_acquire( &the_object->Lock, lock_context );
    632 }
    633 
    634 /**
    635  * @brief Releases a local object.
    636  *
    637  * @param[in] the_object The local object acquired by _Objects_Acquire().
    638  * @param[in] lock_context The lock context initialized by _Objects_Acquire().
    639  */
    640 RTEMS_INLINE_ROUTINE void _Objects_Release(
    641   Objects_Control  *the_object,
    642   ISR_lock_Context *lock_context
    643 )
    644 {
    645   _ISR_lock_Release( &the_object->Lock, lock_context );
    646 }
    647 
    648 /**
    649  * @brief Releases a local object and restores the interrupt level.
    650  *
    651  * @param[in] the_object The local object acquired by _Objects_Acquire().
    652  * @param[in] lock_context The lock context initialized by _Objects_Acquire().
    653  */
    654 RTEMS_INLINE_ROUTINE void _Objects_Release_and_ISR_enable(
    655   Objects_Control  *the_object,
    656   ISR_lock_Context *lock_context
    657 )
    658 {
    659   _ISR_lock_Release_and_ISR_enable( &the_object->Lock, lock_context );
    660 }
    661 
    662 /**
    663  * @brief Releases a local object, disables thread dispatching and restores the
    664  * interrupt level.
    665  *
    666  * @param[in] the_object The local object acquired by _Objects_Acquire().
    667  * @param[in] lock_context The lock context initialized by _Objects_Acquire().
    668  *
    669  * @return The current processor.
    670  */
    671 RTEMS_INLINE_ROUTINE Per_CPU_Control *
    672 _Objects_Release_and_thread_dispatch_disable(
    673   Objects_Control  *the_object,
    674   ISR_lock_Context *lock_context
    675 )
    676 {
    677   Per_CPU_Control *cpu_self;
    678 
    679   cpu_self = _Thread_Dispatch_disable_critical();
    680   _Objects_Release_and_ISR_enable( the_object, lock_context );
    681 
    682   return cpu_self;
    683 }
    684 
    685 /**
    686594 *  Like @ref _Objects_Get, but is used to find "next" open object.
    687595 *
     
    996904
    997905  the_object->name = name;
    998   _ISR_lock_Initialize( &the_object->Lock, "Object" );
    999906
    1000907  _Objects_Set_local_object(
     
    1021928  /* ASSERT: information->is_string == false */
    1022929  the_object->name.name_u32 = name;
    1023   _ISR_lock_Initialize( &the_object->Lock, "Object" );
    1024930
    1025931  _Objects_Set_local_object(
     
    1048954    the_object->name.name_p = name;
    1049955  #endif
    1050   _ISR_lock_Initialize( &the_object->Lock, "Object" );
    1051956
    1052957  _Objects_Set_local_object(
  • cpukit/score/include/rtems/score/thread.h

    r1041de1 rd3802bb5  
    2727#include <rtems/score/mppkt.h>
    2828#endif
     29#include <rtems/score/isrlock.h>
    2930#include <rtems/score/object.h>
    3031#include <rtems/score/percpu.h>
  • cpukit/score/src/objectclose.c

    r1041de1 rd3802bb5  
    2929
    3030  _Objects_Namespace_remove( information, the_object );
    31 
    32   _ISR_lock_Destroy( &the_object->Lock );
    3331}
Note: See TracChangeset for help on using the changeset viewer.