diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-11-23 17:38:09 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-11-23 17:38:09 +0000 |
commit | 97e2729d1a3432b9792b82ce88ce6d804a104f7a (patch) | |
tree | ce8c041ef504f965a4af05775af348c7023b19f9 /cpukit/score | |
parent | Added networking. (diff) | |
download | rtems-97e2729d1a3432b9792b82ce88ce6d804a104f7a.tar.bz2 |
Added --disable-multiprocessing flag and modified a lot of files to make
it work.
Diffstat (limited to 'cpukit/score')
-rw-r--r-- | cpukit/score/include/rtems/score/object.h | 2 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/thread.h | 8 | ||||
-rw-r--r-- | cpukit/score/src/coremsg.c | 6 | ||||
-rw-r--r-- | cpukit/score/src/coremutex.c | 5 | ||||
-rw-r--r-- | cpukit/score/src/coresem.c | 2 | ||||
-rw-r--r-- | cpukit/score/src/mpci.c | 2 | ||||
-rw-r--r-- | cpukit/score/src/object.c | 12 | ||||
-rw-r--r-- | cpukit/score/src/thread.c | 2 | ||||
-rw-r--r-- | cpukit/score/src/threadq.c | 22 |
9 files changed, 57 insertions, 4 deletions
diff --git a/cpukit/score/include/rtems/score/object.h b/cpukit/score/include/rtems/score/object.h index 0198731b96..a0bf3707b6 100644 --- a/cpukit/score/include/rtems/score/object.h +++ b/cpukit/score/include/rtems/score/object.h @@ -387,7 +387,9 @@ Objects_Information *_Objects_Get_information( */ #include <rtems/score/object.inl> +#if defined(RTEMS_MULTIPROCESSING) #include <rtems/score/objectmp.h> +#endif #ifdef __cplusplus } diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h index 7fc3361c39..574d0493d2 100644 --- a/cpukit/score/include/rtems/score/thread.h +++ b/cpukit/score/include/rtems/score/thread.h @@ -23,7 +23,9 @@ extern "C" { #include <rtems/score/context.h> #include <rtems/score/cpu.h> +#if defined(RTEMS_MULTIPROCESSING) #include <rtems/score/mppkt.h> +#endif #include <rtems/score/object.h> #include <rtems/score/priority.h> #include <rtems/score/stack.h> @@ -141,7 +143,9 @@ typedef struct { unsigned32 resource_count; Thread_Wait_information Wait; Watchdog_Control Timer; +#if defined(RTEMS_MULTIPROCESSING) MP_packet_Prefix *receive_packet; +#endif /****************** end of common block ********************/ Chain_Node Active; } Thread_Proxy_control; @@ -171,7 +175,9 @@ struct Thread_Control_struct { unsigned32 resource_count; Thread_Wait_information Wait; Watchdog_Control Timer; +#if defined(RTEMS_MULTIPROCESSING) MP_packet_Prefix *receive_packet; +#endif /****************** end of common block ********************/ boolean is_global; boolean do_post_task_switch_extension; @@ -619,7 +625,9 @@ Thread _Thread_Idle_body( #ifndef __RTEMS_APPLICATION__ #include <rtems/score/thread.inl> #endif +#if defined(RTEMS_MULTIPROCESSING) #include <rtems/score/threadmp.h> +#endif #ifdef __cplusplus } 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 ); |