source: rtems/cpukit/score/src/objectgetisr.c @ 25f5730f

4.11
Last change on this file since 25f5730f was c499856, checked in by Chris Johns <chrisj@…>, on Mar 20, 2014 at 9:10:47 PM

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 1.3 KB
Line 
1/**
2 *  @file
3 *
4 *  @brief Object Get Isr Disable
5 *  @ingroup ScoreObject
6 */
7
8/*
9 *  COPYRIGHT (c) 1989-1999.
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_isr_disable(
24  Objects_Information *information,
25  Objects_Id           id,
26  Objects_Locations   *location,
27  ISR_Level           *level_p
28)
29{
30  Objects_Control *the_object;
31  uint32_t         index;
32  ISR_Level        level;
33
34  index = id - information->minimum_id + 1;
35
36  if ( information->maximum >= index ) {
37#if defined(RTEMS_SMP)
38    _Thread_Disable_dispatch();
39#endif
40    _ISR_Disable( level );
41    if ( (the_object = information->local_table[ index ]) != NULL ) {
42      *location = OBJECTS_LOCAL;
43      *level_p = level;
44      return the_object;
45    }
46    _ISR_Enable( level );
47#if defined(RTEMS_SMP)
48    _Thread_Enable_dispatch();
49#endif
50    *location = OBJECTS_ERROR;
51    return NULL;
52  }
53  *location = OBJECTS_ERROR;
54
55#if defined(RTEMS_MULTIPROCESSING)
56  _Objects_MP_Is_remote( information, id, location, &the_object );
57  return the_object;
58#else
59  return NULL;
60#endif
61}
Note: See TracBrowser for help on using the repository browser.