RTEMS
threadget.c
Go to the documentation of this file.
1 
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 #ifdef HAVE_CONFIG_H
19 #include "config.h"
20 #endif
21 
22 #include <rtems/score/threadimpl.h>
23 
25  Objects_Id id,
26  ISR_lock_Context *lock_context
27 )
28 {
29  Objects_Information *information;
30 
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 }
static __inline__ Objects_Information * _Thread_Get_objects_information(Objects_Id id)
Gets object information for the object id.
Definition: threadimpl.h:826
#define OBJECTS_ID_OF_SELF
Definition: object.h:194
Thread_Control * _Thread_Get(Objects_Id id, ISR_lock_Context *lock_context)
Gets a thread by its identifier.
Definition: threadget.c:24
The information structure used to manage each API class of objects.
Definition: objectdata.h:176
#define _ISR_lock_ISR_disable(_context)
Disables interrupts and saves the previous interrupt state in the ISR lock context.
Definition: isrlock.h:392
Inlined Routines from the Thread Handler.
uint32_t Objects_Id
Definition: object.h:80
Objects_Control * _Objects_Get(Objects_Id id, ISR_lock_Context *lock_context, const Objects_Information *information)
Maps the specified object identifier to the associated local object control block.
Local ISR lock context for acquire and release pairs.
Definition: isrlock.h:65
static __inline__ bool _Objects_Are_ids_equal(Objects_Id left, Objects_Id right)
Checks if two object IDs are equal.
Definition: objectimpl.h:611