5
Last change
on this file since 0daa8ab was
e266d13,
checked in by Sebastian Huber <sebastian.huber@…>, on 05/20/16 at 13:10:27
|
Replace *_Get_interrupt_disable() with *_Get()
Uniformly use *_Get() to get an object by identifier with a lock
context.
|
-
Property mode set to
100644
|
File size:
880 bytes
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief Maps Thread IDs to TCB Pointer |
---|
5 | * |
---|
6 | * @ingroup ScoreThread |
---|
7 | */ |
---|
8 | |
---|
9 | /* |
---|
10 | * COPYRIGHT (c) 1989-2011. |
---|
11 | * On-Line Applications Research Corporation (OAR). |
---|
12 | * |
---|
13 | * The license and distribution terms for this file may be |
---|
14 | * found in the file LICENSE in this distribution or at |
---|
15 | * http://www.rtems.org/license/LICENSE. |
---|
16 | */ |
---|
17 | |
---|
18 | #if HAVE_CONFIG_H |
---|
19 | #include "config.h" |
---|
20 | #endif |
---|
21 | |
---|
22 | #include <rtems/score/threadimpl.h> |
---|
23 | |
---|
24 | Thread_Control *_Thread_Get( |
---|
25 | Objects_Id id, |
---|
26 | ISR_lock_Context *lock_context |
---|
27 | ) |
---|
28 | { |
---|
29 | Objects_Information *information; |
---|
30 | |
---|
31 | if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { |
---|
32 | _ISR_lock_ISR_disable( lock_context ); |
---|
33 | return _Thread_Executing; |
---|
34 | } |
---|
35 | |
---|
36 | information = _Thread_Get_objects_information( id ); |
---|
37 | if ( information == NULL ) { |
---|
38 | return NULL; |
---|
39 | } |
---|
40 | |
---|
41 | return (Thread_Control *) |
---|
42 | _Objects_Get( id, lock_context, information ); |
---|
43 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.