4.115
Last change
on this file since 25f5730f was
c499856,
checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47
|
Change all references of rtems.com to rtems.org.
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Rev | Line | |
---|
[f2f63d1] | 1 | /** |
---|
| 2 | * @file |
---|
[d895fe8] | 3 | * |
---|
[f2f63d1] | 4 | * @brief Object Get Isr Disable |
---|
| 5 | * @ingroup ScoreObject |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | /* |
---|
[d895fe8] | 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 |
---|
[c499856] | 14 | * http://www.rtems.org/license/LICENSE. |
---|
[d895fe8] | 15 | */ |
---|
| 16 | |
---|
[a8eed23] | 17 | #if HAVE_CONFIG_H |
---|
| 18 | #include "config.h" |
---|
| 19 | #endif |
---|
| 20 | |
---|
[a2e3f33] | 21 | #include <rtems/score/objectimpl.h> |
---|
[d895fe8] | 22 | |
---|
| 23 | Objects_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; |
---|
[3127180] | 31 | uint32_t index; |
---|
[d895fe8] | 32 | ISR_Level level; |
---|
| 33 | |
---|
[c31c15c] | 34 | index = id - information->minimum_id + 1; |
---|
[d895fe8] | 35 | |
---|
| 36 | if ( information->maximum >= index ) { |
---|
[54e9216] | 37 | #if defined(RTEMS_SMP) |
---|
| 38 | _Thread_Disable_dispatch(); |
---|
| 39 | #endif |
---|
[c398c66] | 40 | _ISR_Disable( level ); |
---|
[d895fe8] | 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 ); |
---|
[54e9216] | 47 | #if defined(RTEMS_SMP) |
---|
| 48 | _Thread_Enable_dispatch(); |
---|
| 49 | #endif |
---|
[d895fe8] | 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.