summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/threadget.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-07-27 02:17:31 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-07-27 02:17:31 +0000
commit56e135a1a25bef46309a39ffc6dbdfe377c882e3 (patch)
tree331e9db1595b4b999fdadd7ad18f3c90bb84114f /cpukit/score/src/threadget.c
parent2010-07-26 Joel Sherrill <joel.sherrilL@OARcorp.com> (diff)
downloadrtems-56e135a1a25bef46309a39ffc6dbdfe377c882e3.tar.bz2
2010-07-26 Joel Sherrill <joel.sherrilL@OARcorp.com>
* score/src/threadget.c: Conditionalize a check that can only occur when POSIX is disabled.
Diffstat (limited to 'cpukit/score/src/threadget.c')
-rw-r--r--cpukit/score/src/threadget.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/cpukit/score/src/threadget.c b/cpukit/score/src/threadget.c
index c531fd9bf0..920da99566 100644
--- a/cpukit/score/src/threadget.c
+++ b/cpukit/score/src/threadget.c
@@ -1,8 +1,7 @@
/*
- * Thread Handler
+ * Thread Handler - Object Id to Thread Pointer
*
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -45,7 +44,6 @@
* cycles off the execution time, this routine is worth
* further optimization attention.
*/
-
Thread_Control *_Thread_Get (
Objects_Id id,
Objects_Locations *location
@@ -77,10 +75,15 @@ Thread_Control *_Thread_Get (
}
api_information = _Objects_Information_table[ the_api ];
- if ( !api_information ) {
- *location = OBJECTS_ERROR;
- goto done;
- }
+ /*
+ * There is no way for this to happen if POSIX is enabled.
+ */
+ #if !defined(RTEMS_POSIX_API)
+ if ( !api_information ) {
+ *location = OBJECTS_ERROR;
+ goto done;
+ }
+ #endif
information = api_information[ the_class ];
if ( !information ) {