| File: | /home/joel/rtems-4.11-work/build/rtems/c/src/../../cpukit/rtems/src/ratemonresetall.c |
| Location: | line 49, column 7 |
| Description: | Value stored to 'status' is never read |
| 1 | /* |
| 2 | * Rate Monotonic Manager -- Reset Statistics for All Periods |
| 3 | * |
| 4 | * COPYRIGHT (c) 1989-2007. |
| 5 | * On-Line Applications Research Corporation (OAR). |
| 6 | * |
| 7 | * The license and distribution terms for this file may be |
| 8 | * found in the file LICENSE in this distribution or at |
| 9 | * http://www.rtems.com/license/LICENSE. |
| 10 | * |
| 11 | * $Id: ratemonresetall.c,v 1.2 2007/05/17 22:46:45 joel Exp $ |
| 12 | */ |
| 13 | |
| 14 | #ifdef HAVE_CONFIG_H1 |
| 15 | #include "config.h" |
| 16 | #endif |
| 17 | |
| 18 | #include <rtems/system.h> |
| 19 | #include <rtems/rtems/status.h> |
| 20 | #include <rtems/rtems/support.h> |
| 21 | #include <rtems/score/object.h> |
| 22 | #include <rtems/rtems/ratemon.h> |
| 23 | #include <rtems/score/thread.h> |
| 24 | |
| 25 | /* |
| 26 | * rtems_rate_monotonic_reset_all_statistics |
| 27 | */ |
| 28 | void rtems_rate_monotonic_reset_all_statistics( void ) |
| 29 | { |
| 30 | Objects_Id id; |
| 31 | rtems_status_code status; |
| 32 | |
| 33 | /* |
| 34 | * Prevent allocation or deallocation of any of the periods while |
| 35 | * we are cycling. Also this is an optimization which ensures that |
| 36 | * we only disable/enable once. The call to |
| 37 | * rtems_rate_monotonic_reset_statistics will be in a nested dispatch |
| 38 | * disabled critical section. |
| 39 | */ |
| 40 | _Thread_Disable_dispatch(); |
| 41 | |
| 42 | /* |
| 43 | * Cycle through all possible ids and try to reset each one. If it |
| 44 | * is a period that is inactive, we just get an error back. No big deal. |
| 45 | */ |
| 46 | for ( id=_Rate_monotonic_Information.minimum_id ; |
| 47 | id <= _Rate_monotonic_Information.maximum_id ; |
| 48 | id++ ) { |
| 49 | status = rtems_rate_monotonic_reset_statistics( id ); |
Value stored to 'status' is never read | |
| 50 | } |
| 51 | |
| 52 | /* |
| 53 | * Done so exit thread dispatching disabled critical section. |
| 54 | */ |
| 55 | _Thread_Enable_dispatch(); |
| 56 | } |