summaryrefslogtreecommitdiffstats
path: root/cpukit/score/inline
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cpukit/score/inline/rtems/score/address.inl2
-rw-r--r--cpukit/score/inline/rtems/score/coremsg.inl2
-rw-r--r--cpukit/score/inline/rtems/score/thread.inl14
3 files changed, 13 insertions, 5 deletions
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 <string.h> /* 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
*