summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/src')
-rw-r--r--cpukit/score/src/coremsg.c6
-rw-r--r--cpukit/score/src/coremutex.c5
-rw-r--r--cpukit/score/src/coresem.c2
-rw-r--r--cpukit/score/src/mpci.c2
-rw-r--r--cpukit/score/src/object.c12
-rw-r--r--cpukit/score/src/thread.c2
-rw-r--r--cpukit/score/src/threadq.c22
7 files changed, 47 insertions, 4 deletions
diff --git a/cpukit/score/src/coremsg.c b/cpukit/score/src/coremsg.c
index 34778d26cd..1300b49951 100644
--- a/cpukit/score/src/coremsg.c
+++ b/cpukit/score/src/coremsg.c
@@ -26,7 +26,9 @@
#include <rtems/score/states.h>
#include <rtems/score/thread.h>
#include <rtems/score/wkspace.h>
+#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/score/mpci.h>
+#endif
/*PAGE
*
@@ -217,8 +219,10 @@ CORE_message_queue_Status _CORE_message_queue_Broadcast(
*(unsigned32 *)the_thread->Wait.return_argument_1 = size;
+#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
+#endif
}
*count = number_broadcasted;
@@ -394,8 +398,10 @@ CORE_message_queue_Status _CORE_message_queue_Submit(
);
*(unsigned32 *)the_thread->Wait.return_argument_1 = size;
+#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
+#endif
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
diff --git a/cpukit/score/src/coremutex.c b/cpukit/score/src/coremutex.c
index dac5a5172b..bda01a06e9 100644
--- a/cpukit/score/src/coremutex.c
+++ b/cpukit/score/src/coremutex.c
@@ -293,6 +293,7 @@ CORE_mutex_Status _CORE_mutex_Surrender(
if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) {
+#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) ) {
the_mutex->holder = NULL;
@@ -301,7 +302,9 @@ CORE_mutex_Status _CORE_mutex_Surrender(
( *api_mutex_mp_support)( the_thread, id );
- } else {
+ } else
+#endif
+ {
the_mutex->holder = the_thread;
the_mutex->holder_id = the_thread->Object.id;
diff --git a/cpukit/score/src/coresem.c b/cpukit/score/src/coresem.c
index 074ba2cb22..b0b471bad6 100644
--- a/cpukit/score/src/coresem.c
+++ b/cpukit/score/src/coresem.c
@@ -24,7 +24,9 @@
#include <rtems/score/states.h>
#include <rtems/score/thread.h>
#include <rtems/score/threadq.h>
+#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/score/mpci.h>
+#endif
/*PAGE
*
diff --git a/cpukit/score/src/mpci.c b/cpukit/score/src/mpci.c
index efe63160f3..ad9ae9c47e 100644
--- a/cpukit/score/src/mpci.c
+++ b/cpukit/score/src/mpci.c
@@ -16,8 +16,10 @@
#include <rtems/system.h>
#include <rtems/score/cpu.h>
#include <rtems/score/interr.h>
+#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/score/mpci.h>
#include <rtems/score/mppkt.h>
+#endif
#include <rtems/score/states.h>
#include <rtems/score/thread.h>
#include <rtems/score/threadq.h>
diff --git a/cpukit/score/src/object.c b/cpukit/score/src/object.c
index 7585235d3b..81bca89d7c 100644
--- a/cpukit/score/src/object.c
+++ b/cpukit/score/src/object.c
@@ -16,7 +16,9 @@
#include <rtems/system.h>
#include <rtems/score/chain.h>
#include <rtems/score/object.h>
+#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/score/objectmp.h>
+#endif
#include <rtems/score/thread.h>
#include <rtems/score/wkspace.h>
#include <rtems/score/sysstate.h>
@@ -51,11 +53,13 @@ void _Objects_Handler_initialization(
_Objects_Local_node = node;
_Objects_Maximum_nodes = maximum_nodes;
+#if defined(RTEMS_MULTIPROCESSING)
_Objects_MP_Handler_initialization(
node,
maximum_nodes,
maximum_global_objects
);
+#endif
}
/*PAGE
@@ -378,7 +382,11 @@ Objects_Name_to_id_errors _Objects_Name_to_id(
if ( _Objects_Is_local_node( node ) || node == OBJECTS_SEARCH_LOCAL_NODE )
return OBJECTS_INVALID_NAME;
+#if defined(RTEMS_MULTIPROCESSING)
return ( _Objects_MP_Global_name_search( information, name, node, id ) );
+#else
+ return OBJECTS_INVALID_NAME;
+#endif
}
/*PAGE
@@ -423,8 +431,12 @@ Objects_Control *_Objects_Get(
return( NULL );
}
*location = OBJECTS_ERROR;
+#if defined(RTEMS_MULTIPROCESSING)
_Objects_MP_Is_remote( information, id, location, &the_object );
return the_object;
+#else
+ return NULL;
+#endif
}
diff --git a/cpukit/score/src/thread.c b/cpukit/score/src/thread.c
index 292e042d57..b663eb6bba 100644
--- a/cpukit/score/src/thread.c
+++ b/cpukit/score/src/thread.c
@@ -81,7 +81,9 @@ void _Thread_Handler_initialization(
for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
_Chain_Initialize_empty( &_Thread_Ready_chain[ index ] );
+#if defined(RTEMS_MULTIPROCESSING)
_Thread_MP_Handler_initialization( maximum_proxies );
+#endif
/*
* Initialize this class of objects.
diff --git a/cpukit/score/src/threadq.c b/cpukit/score/src/threadq.c
index 3cdca9701b..34f0a12383 100644
--- a/cpukit/score/src/threadq.c
+++ b/cpukit/score/src/threadq.c
@@ -97,9 +97,11 @@ void _Thread_queue_Enqueue(
the_thread = _Thread_Executing;
+#if defined(RTEMS_MULTIPROCESSING)
if ( _Thread_MP_Is_receive( the_thread ) && the_thread->receive_packet )
the_thread = _Thread_MP_Allocate_proxy( the_thread_queue->state );
else
+#endif
_Thread_Set_state( the_thread, the_thread_queue->state );
if ( timeout ) {
@@ -255,10 +257,12 @@ void _Thread_queue_Flush(
Thread_Control *the_thread;
while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) {
- if ( _Objects_Is_local_id( the_thread->Object.id ) )
- the_thread->Wait.return_code = status;
- else
+#if defined(RTEMS_MULTIPROCESSING)
+ if ( !_Objects_Is_local_id( the_thread->Object.id ) )
( *remote_extract_callout )( the_thread );
+ else
+#endif
+ the_thread->Wait.return_code = status;
}
}
@@ -423,8 +427,10 @@ void _Thread_queue_Enqueue_fifo (
_Thread_Unblock( the_thread );
+#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
+#endif
}
@@ -468,8 +474,10 @@ Thread_Control *_Thread_queue_Dequeue_fifo(
_Thread_Unblock( the_thread );
}
+#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
+#endif
return the_thread;
}
@@ -532,8 +540,10 @@ void _Thread_queue_Extract_fifo(
_Thread_Unblock( the_thread );
+#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
+#endif
}
@@ -753,8 +763,10 @@ synchronize:
_Thread_Unblock( the_thread );
+#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
+#endif
}
/*PAGE
@@ -852,8 +864,10 @@ dequeue:
_Thread_Unblock( the_thread );
}
+#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
+#endif
return( the_thread );
}
@@ -929,8 +943,10 @@ void _Thread_queue_Extract_priority(
_Thread_Unblock( the_thread );
}
+#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
+#endif
}
else
_ISR_Enable( level );