source: rtems/cpukit/rtems/src/ratemondelete.c @ 9b4422a2

4.115
Last change on this file since 9b4422a2 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 1.6 KB
Line 
1/*
2 *  Rate Monotonic Manager -- Delete a Period
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
12#if HAVE_CONFIG_H
13#include "config.h"
14#endif
15
16#include <rtems/system.h>
17#include <rtems/rtems/status.h>
18#include <rtems/rtems/support.h>
19#include <rtems/score/isr.h>
20#include <rtems/score/object.h>
21#include <rtems/rtems/ratemon.h>
22#include <rtems/score/thread.h>
23
24/*
25 *  rtems_rate_monotonic_delete
26 *
27 *  This directive allows a thread to delete a rate monotonic timer.
28 *
29 *  Input parameters:
30 *    id - rate monotonic id
31 *
32 *  Output parameters:
33 *    RTEMS_SUCCESSFUL - if successful
34 *    error code       - if unsuccessful
35 */
36
37rtems_status_code rtems_rate_monotonic_delete(
38  rtems_id id
39)
40{
41  Rate_monotonic_Control *the_period;
42  Objects_Locations       location;
43
44  the_period = _Rate_monotonic_Get( id, &location );
45  switch ( location ) {
46
47    case OBJECTS_LOCAL:
48      _Scheduler_Release_job(the_period->owner, 0);
49      _Objects_Close( &_Rate_monotonic_Information, &the_period->Object );
50      (void) _Watchdog_Remove( &the_period->Timer );
51      the_period->state = RATE_MONOTONIC_INACTIVE;
52      _Rate_monotonic_Free( the_period );
53      _Thread_Enable_dispatch();
54      return RTEMS_SUCCESSFUL;
55
56#if defined(RTEMS_MULTIPROCESSING)
57    case OBJECTS_REMOTE:            /* should never return this */
58#endif
59    case OBJECTS_ERROR:
60      break;
61  }
62
63  return RTEMS_INVALID_ID;
64}
Note: See TracBrowser for help on using the repository browser.