source: rtems/cpukit/rtems/src/ratemonresetall.c @ 3692095

5
Last change on this file since 3692095 was 30cac38f, checked in by Sebastian Huber <sebastian.huber@…>, on 03/22/16 at 06:40:18

rtems: Use object allocator lock

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

Update #2555.

  • Property mode set to 100644
File size: 1.1 KB
Line 
1/**
2 * @file
3 *
4 * @brief rtems_rate_monotonic_reset_all_statistics
5 * @ingroup ClassicRateMon Rate Monotonic Scheduler
6 */
7
8/*
9 *  COPYRIGHT (c) 1989-2010.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.org/license/LICENSE.
15 */
16
17#ifdef HAVE_CONFIG_H
18#include "config.h"
19#endif
20
21#include <rtems/rtems/ratemonimpl.h>
22
23/*
24 *  rtems_rate_monotonic_reset_all_statistics
25 */
26void rtems_rate_monotonic_reset_all_statistics( void )
27{
28  Objects_Id        id;
29
30   /*
31    * Prevent allocation or deallocation of any of the periods while we are
32    * cycling.
33    */
34  _Objects_Allocator_lock();
35
36    /*
37     * Cycle through all possible ids and try to reset each one.  If it
38     * is a period that is inactive, we just get an error back.  No big deal.
39     */
40    for ( id=_Rate_monotonic_Information.minimum_id ;
41          id <= _Rate_monotonic_Information.maximum_id ;
42          id++ ) {
43      (void) rtems_rate_monotonic_reset_statistics( id );
44    }
45
46  _Objects_Allocator_unlock();
47}
Note: See TracBrowser for help on using the repository browser.