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