source: rtems/cpukit/rtems/src/ratemoncancel.c @ c05d7502

4.115
Last change on this file since c05d7502 was c05d7502, checked in by Mathew Kallada <matkallada@…>, on 12/02/12 at 22:59:17

score misc: Clean up Doxygen #14 (GCI 2012)

This patch is a task from GCI 2012 which improves the Doxygen
comments in the RTEMS source.

http://www.google-melange.com/gci/task/view/google/gci2012/8025204

  • Property mode set to 100644
File size: 1.3 KB
Line 
1/**
2 *  @file
3 *
4 *  @brief RTEMS Rate Monotonic Cancel
5 *  @ingroup ClassicRateMon
6 */
7
8/*
9 *  COPYRIGHT (c) 1989-2007.
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.com/license/LICENSE.
15 */
16
17#if HAVE_CONFIG_H
18#include "config.h"
19#endif
20
21#include <rtems/system.h>
22#include <rtems/rtems/status.h>
23#include <rtems/rtems/support.h>
24#include <rtems/score/isr.h>
25#include <rtems/score/object.h>
26#include <rtems/rtems/ratemon.h>
27#include <rtems/score/thread.h>
28
29rtems_status_code rtems_rate_monotonic_cancel(
30  rtems_id id
31)
32{
33  Rate_monotonic_Control *the_period;
34  Objects_Locations       location;
35
36  the_period = _Rate_monotonic_Get( id, &location );
37  switch ( location ) {
38
39    case OBJECTS_LOCAL:
40      if ( !_Thread_Is_executing( the_period->owner ) ) {
41        _Thread_Enable_dispatch();
42        return RTEMS_NOT_OWNER_OF_RESOURCE;
43      }
44      (void) _Watchdog_Remove( &the_period->Timer );
45      the_period->state = RATE_MONOTONIC_INACTIVE;
46      _Scheduler_Release_job(the_period->owner, 0);
47      _Thread_Enable_dispatch();
48      return RTEMS_SUCCESSFUL;
49
50#if defined(RTEMS_MULTIPROCESSING)
51    case OBJECTS_REMOTE:
52#endif
53    case OBJECTS_ERROR:
54      break;
55  }
56
57  return RTEMS_INVALID_ID;
58}
Note: See TracBrowser for help on using the repository browser.