Changeset 30cac38 in rtems


Ignore:
Timestamp:
Mar 22, 2016, 6:40:18 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
c61431f9
Parents:
baa13626
git-author:
Sebastian Huber <sebastian.huber@…> (03/22/16 06:40:18)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/22/16 06:44:13)
Message:

rtems: Use object allocator lock

Object creation and destruction is protected by the object allocator
lock and not disabled thread dispatching.

Update #2555.

File:
1 edited

Legend:

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

    rbaa13626 r30cac38  
    1919#endif
    2020
    21 #include <rtems/system.h>
    22 #include <rtems/rtems/status.h>
    23 #include <rtems/rtems/support.h>
    2421#include <rtems/rtems/ratemonimpl.h>
    25 #include <rtems/score/thread.h>
    2622
    2723/*
     
    3329
    3430   /*
    35     *  Prevent allocation or deallocation of any of the periods while
    36     *  we are cycling.  Also this is an optimization which ensures that
    37     *  we only disable/enable once.  The call to
    38     *  rtems_rate_monotonic_reset_statistics will be in a nested dispatch
    39     *  disabled critical section.
     31    * Prevent allocation or deallocation of any of the periods while we are
     32    * cycling.
    4033    */
    41   _Thread_Disable_dispatch();
     34  _Objects_Allocator_lock();
    4235
    4336    /*
     
    5144    }
    5245
    53   /*
    54    *  Done so exit thread dispatching disabled critical section.
    55    */
    56   _Thread_Enable_dispatch();
     46  _Objects_Allocator_unlock();
    5747}
Note: See TracChangeset for help on using the changeset viewer.