From c64e4ed48285a0c944905bc02de89c20038f428b Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 15 Jan 1996 21:50:28 +0000 Subject: updates from Tony Bennett for PA and UNIX ports --- cpukit/score/inline/rtems/score/address.inl | 2 +- cpukit/score/inline/rtems/score/coremsg.inl | 2 ++ cpukit/score/inline/rtems/score/thread.inl | 14 ++++++++++---- 3 files changed, 13 insertions(+), 5 deletions(-) (limited to 'cpukit/score/inline') diff --git a/cpukit/score/inline/rtems/score/address.inl b/cpukit/score/inline/rtems/score/address.inl index dd2a789b1e..c1bb098577 100644 --- a/cpukit/score/inline/rtems/score/address.inl +++ b/cpukit/score/inline/rtems/score/address.inl @@ -58,7 +58,7 @@ STATIC INLINE unsigned32 _Addresses_Subtract ( void *right ) { - return (left - right); + return ((char *) left - (char *) right); } /*PAGE diff --git a/cpukit/score/inline/rtems/score/coremsg.inl b/cpukit/score/inline/rtems/score/coremsg.inl index 6431979dd3..5a1b5d4a10 100644 --- a/cpukit/score/inline/rtems/score/coremsg.inl +++ b/cpukit/score/inline/rtems/score/coremsg.inl @@ -17,6 +17,8 @@ #ifndef __CORE_MESSAGE_QUEUE_inl #define __CORE_MESSAGE_QUEUE_inl +#include /* needed for memcpy */ + /*PAGE * * _CORE_message_queue_Send diff --git a/cpukit/score/inline/rtems/score/thread.inl b/cpukit/score/inline/rtems/score/thread.inl index e326410112..3a96acf4ea 100644 --- a/cpukit/score/inline/rtems/score/thread.inl +++ b/cpukit/score/inline/rtems/score/thread.inl @@ -241,30 +241,36 @@ STATIC INLINE Thread_Control *_Thread_Get ( { Objects_Classes the_class; Objects_Information *information; + Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; - return( _Thread_Executing ); + tp = _Thread_Executing; + goto done; } the_class = _Objects_Get_class( id ); if ( the_class > OBJECTS_CLASSES_LAST ) { *location = OBJECTS_ERROR; - return (Thread_Control *) 0; + goto done; } information = _Objects_Information_table[ the_class ]; if ( !information || !information->is_thread ) { *location = OBJECTS_ERROR; - return (Thread_Control *) 0; + goto done; } - return (Thread_Control *) _Objects_Get( information, id, location ); + tp = (Thread_Control *) _Objects_Get( information, id, location ); + +done: + return tp; } + /* * _Thread_Is_proxy_blocking * -- cgit v1.2.3