source: rtems/cpukit/score/src/objectgetnoprotection.c @ e6f7f81

4.115
Last change on this file since e6f7f81 was 355ee7d, checked in by Alex Ivanov <alexivanov97@…>, on 11/28/12 at 19:57:31

score misc: Clean up Doxygen #3 (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/7982215

  • Property mode set to 100644
File size: 1.4 KB
Line 
1/**
2 *  @file
3 *
4 *  @brief  Get Object without Dispatching Protection
5 *  @ingroup ScoreObject
6 */
7
8/*
9 *  COPYRIGHT (c) 1989-2002.
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/score/address.h>
23#include <rtems/score/chain.h>
24#include <rtems/score/object.h>
25#if defined(RTEMS_MULTIPROCESSING)
26#include <rtems/score/objectmp.h>
27#endif
28#include <rtems/score/thread.h>
29#include <rtems/score/wkspace.h>
30#include <rtems/score/sysstate.h>
31#include <rtems/score/isr.h>
32
33Objects_Control *_Objects_Get_no_protection(
34  Objects_Information *information,
35  Objects_Id           id,
36  Objects_Locations   *location
37)
38{
39  Objects_Control *the_object;
40  uint32_t         index;
41
42  /*
43   * You can't just extract the index portion or you can get tricked
44   * by a value between 1 and maximum.
45   */
46  index = id - information->minimum_id + 1;
47
48  if ( information->maximum >= index ) {
49    if ( (the_object = information->local_table[ index ]) != NULL ) {
50      *location = OBJECTS_LOCAL;
51      return the_object;
52    }
53  }
54
55  /*
56   *  This isn't supported or required yet for Global objects so
57   *  if it isn't local, we don't find it.
58   */
59  *location = OBJECTS_ERROR;
60  return NULL;
61}
Note: See TracBrowser for help on using the repository browser.