RTEMS
ratemonresetstatistics.c
Go to the documentation of this file.
1 
9 /*
10  * COPYRIGHT (c) 1989-2007.
11  * On-Line Applications Research Corporation (OAR).
12  *
13  * The license and distribution terms for this file may be
14  * found in the file LICENSE in this distribution or at
15  * http://www.rtems.org/license/LICENSE.
16  */
17 
18 #ifdef HAVE_CONFIG_H
19 #include "config.h"
20 #endif
21 
23 
25  rtems_id id
26 )
27 {
28  Rate_monotonic_Control *the_period;
29  ISR_lock_Context lock_context;
30 
31  the_period = _Rate_monotonic_Get( id, &lock_context );
32  if ( the_period == NULL ) {
33  return RTEMS_INVALID_ID;
34  }
35 
36  _Rate_monotonic_Acquire_critical( the_period, &lock_context );
37  _Rate_monotonic_Reset_statistics( the_period );
38  _Rate_monotonic_Release( the_period, &lock_context );
39  return RTEMS_SUCCESSFUL;
40 }
rtems_status_code rtems_rate_monotonic_reset_statistics(rtems_id id)
%
This status code indicates successful completion.
Definition: status.h:86
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:82
The following structure defines the control block used to manage each period.
Definition: ratemondata.h:69
This status code indicates that an object identifier was invalid.
Definition: status.h:106
Objects_Id rtems_id
Values of this type identify an RTEMS object.
Definition: types.h:99
Classic Rate Monotonic Scheduler Implementation.
Local ISR lock context for acquire and release pairs.
Definition: isrlock.h:65