source: rtems/cpukit/score/src/objectgetnoprotection.c @ 8a8b95aa

5
Last change on this file since 8a8b95aa was 4c20da4b, checked in by Sebastian Huber <sebastian.huber@…>, on 04/04/19 at 07:18:11

doxygen: Rename Score* groups in RTEMSScore*

Update #3706

  • Property mode set to 100644
File size: 1000 bytes
Line 
1/**
2 *  @file
3 *
4 *  @brief  Get Object without Dispatching Protection
5 *  @ingroup RTEMSScoreObject
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.org/license/LICENSE.
15 */
16
17#if HAVE_CONFIG_H
18#include "config.h"
19#endif
20
21#include <rtems/score/objectimpl.h>
22
23Objects_Control *_Objects_Get_no_protection(
24  Objects_Id                 id,
25  const Objects_Information *information
26)
27{
28  Objects_Id delta;
29  Objects_Id maximum_id;
30  Objects_Id end;
31
32  maximum_id = information->maximum_id;
33  delta = maximum_id - id;
34  end = _Objects_Get_index( maximum_id );
35
36  if ( RTEMS_PREDICT_TRUE( delta < end ) ) {
37    return information->local_table[ end - OBJECTS_INDEX_MINIMUM - delta ];
38  }
39
40  /*
41   *  This isn't supported or required yet for Global objects so
42   *  if it isn't local, we don't find it.
43   */
44  return NULL;
45}
Note: See TracBrowser for help on using the repository browser.