diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-07-27 02:17:31 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-07-27 02:17:31 +0000 |
commit | 56e135a1a25bef46309a39ffc6dbdfe377c882e3 (patch) | |
tree | 331e9db1595b4b999fdadd7ad18f3c90bb84114f /cpukit | |
parent | 2010-07-26 Joel Sherrill <joel.sherrilL@OARcorp.com> (diff) | |
download | rtems-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')
-rw-r--r-- | cpukit/ChangeLog | 5 | ||||
-rw-r--r-- | cpukit/score/src/threadget.c | 19 |
2 files changed, 16 insertions, 8 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index c78cc85fbd..8f58ca62b9 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,5 +1,10 @@ 2010-07-26 Joel Sherrill <joel.sherrilL@OARcorp.com> + * score/src/threadget.c: Conditionalize a check that can only occur + when POSIX is disabled. + +2010-07-26 Joel Sherrill <joel.sherrilL@OARcorp.com> + * rtems/src/taskmode.c, score/inline/rtems/score/thread.inl: Rework a bit to eliminate unreachable path for task blocked while calling rtems_task_mode() on itself. 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 ) { |