source: rtems/cpukit/score/src/objectgetlocal.c @ 582bb23c

5
Last change on this file since 582bb23c was 582bb23c, checked in by Sebastian Huber <sebastian.huber@…>, on 05/20/16 at 13:04:16

score: Rename _Objects_Get_local()

Rename _Objects_Get_local() into _Objects_Get(). Confusions with the
previous _Objects_Get() function are avoided since the Objects_Locations
parameter is gone.

  • Property mode set to 100644
File size: 1.0 KB
Line 
1/**
2 *  @file
3 *
4 *  @brief Object Get Local
5 *  @ingroup ScoreObject
6 */
7
8/*
9 * Copyright (c) 2016 embedded brains GmbH.  All rights reserved.
10 *
11 *  embedded brains GmbH
12 *  Dornierstr. 4
13 *  82178 Puchheim
14 *  Germany
15 *  <rtems@embedded-brains.de>
16 *
17 * The license and distribution terms for this file may be
18 * found in the file LICENSE in this distribution or at
19 * http://www.rtems.org/license/LICENSE.
20 */
21
22#if HAVE_CONFIG_H
23#include "config.h"
24#endif
25
26#include <rtems/score/objectimpl.h>
27
28Objects_Control *_Objects_Get(
29  Objects_Id                 id,
30  ISR_lock_Context          *lock_context,
31  const Objects_Information *information
32)
33{
34  uint32_t index;
35
36  index = id - information->minimum_id + 1;
37
38  if ( information->maximum >= index ) {
39    Objects_Control *the_object;
40
41    _ISR_lock_ISR_disable( lock_context );
42
43    the_object = information->local_table[ index ];
44    if ( the_object != NULL ) {
45      /* ISR disabled on behalf of caller */
46      return the_object;
47    }
48
49    _ISR_lock_ISR_enable( lock_context );
50  }
51
52  return NULL;
53}
Note: See TracBrowser for help on using the repository browser.