From 3b76313da986859d9133bfab342009336ac17aff Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 19 Apr 1996 21:09:20 +0000 Subject: modified to generate fatal error when an unconfigured directive is invoked. --- c/src/optman/rtems/no-dpmem.c | 26 +++++++++++++++++ c/src/optman/rtems/no-event.c | 15 ++++++++++ c/src/optman/rtems/no-mp.c | 66 ++++++++++++++++++++++++++++++++++++++++++ c/src/optman/rtems/no-msg.c | 58 +++++++++++++++++++++++++++++++++++++ c/src/optman/rtems/no-part.c | 26 +++++++++++++++++ c/src/optman/rtems/no-region.c | 31 ++++++++++++++++++++ c/src/optman/rtems/no-rtmon.c | 38 +++++++++++++++++++++++- c/src/optman/rtems/no-sem.c | 33 ++++++++++++++++++++- c/src/optman/rtems/no-signal.c | 11 +++++++ c/src/optman/rtems/no-timer.c | 36 +++++++++++++++++++++++ 10 files changed, 338 insertions(+), 2 deletions(-) (limited to 'c/src/optman/rtems') diff --git a/c/src/optman/rtems/no-dpmem.c b/c/src/optman/rtems/no-dpmem.c index ac0dc13c7f..11f2641feb 100644 --- a/c/src/optman/rtems/no-dpmem.c +++ b/c/src/optman/rtems/no-dpmem.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -35,6 +36,11 @@ rtems_status_code rtems_port_create( Objects_Id *id ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -43,6 +49,11 @@ rtems_status_code rtems_port_ident( Objects_Id *id ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -50,6 +61,11 @@ rtems_status_code rtems_port_delete( Objects_Id id ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -59,6 +75,11 @@ rtems_status_code rtems_port_internal_to_external( void **external ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -68,5 +89,10 @@ rtems_status_code rtems_port_external_to_internal( void **internal ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } diff --git a/c/src/optman/rtems/no-event.c b/c/src/optman/rtems/no-event.c index 7f1ca07f6c..4eb984c011 100644 --- a/c/src/optman/rtems/no-event.c +++ b/c/src/optman/rtems/no-event.c @@ -20,12 +20,22 @@ #include #include #include +#include + +void _Event_Manager_initialization( void ) +{ +} rtems_status_code rtems_event_send( Objects_Id id, rtems_event_set event_in ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -36,6 +46,11 @@ rtems_status_code rtems_event_receive( rtems_event_set *event_out ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } diff --git a/c/src/optman/rtems/no-mp.c b/c/src/optman/rtems/no-mp.c index 9054f89d36..f6adc53c76 100644 --- a/c/src/optman/rtems/no-mp.c +++ b/c/src/optman/rtems/no-mp.c @@ -26,6 +26,7 @@ #include #include #include +#include void _Multiprocessing_Manager_initialization ( void ) { @@ -33,6 +34,11 @@ void _Multiprocessing_Manager_initialization ( void ) void rtems_multiprocessing_announce ( void ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); } void _MPCI_Handler_initialization( @@ -60,6 +66,11 @@ void _MPCI_Register_packet_processor( MP_packet_Prefix *_MPCI_Get_packet ( void ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return NULL; } @@ -67,6 +78,11 @@ void _MPCI_Return_packet ( MP_packet_Prefix *the_packet ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); } void _MPCI_Send_process_packet ( @@ -74,6 +90,11 @@ void _MPCI_Send_process_packet ( MP_packet_Prefix *the_packet ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); } unsigned32 _MPCI_Send_request_packet ( @@ -82,6 +103,11 @@ unsigned32 _MPCI_Send_request_packet ( States_Control extra_state ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return 0; } @@ -90,10 +116,20 @@ void _MPCI_Send_response_packet ( MP_packet_Prefix *the_packet ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); } MP_packet_Prefix *_MPCI_Receive_packet ( void ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return NULL; } @@ -101,6 +137,11 @@ Thread_Control *_MPCI_Process_response ( MP_packet_Prefix *the_packet ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return NULL; } @@ -108,10 +149,20 @@ Thread _MPCI_Receive_server( unsigned32 ignore ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); } void _MPCI_Announce ( void ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); } @@ -119,16 +170,31 @@ void _MPCI_Internal_packets_Send_process_packet ( MPCI_Internal_Remote_operations operation ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); } void _MPCI_Internal_packets_Process_packet ( MP_packet_Prefix *the_packet_prefix ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); } MPCI_Internal_packet *_MPCI_Internal_packets_Get_packet ( void ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return NULL; } diff --git a/c/src/optman/rtems/no-msg.c b/c/src/optman/rtems/no-msg.c index 9567297b73..6a5b84652a 100644 --- a/c/src/optman/rtems/no-msg.c +++ b/c/src/optman/rtems/no-msg.c @@ -24,6 +24,7 @@ #include #include #include +#include void _Message_queue_Manager_initialization( unsigned32 maximum_message_queues @@ -39,6 +40,11 @@ rtems_status_code rtems_message_queue_create( Objects_Id *id ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -48,6 +54,11 @@ rtems_status_code rtems_message_queue_ident( Objects_Id *id ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -55,6 +66,11 @@ rtems_status_code rtems_message_queue_delete( Objects_Id id ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -64,6 +80,11 @@ rtems_status_code rtems_message_queue_send( unsigned32 size ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -73,6 +94,11 @@ rtems_status_code rtems_message_queue_urgent( unsigned32 size ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -83,6 +109,11 @@ rtems_status_code rtems_message_queue_broadcast( unsigned32 *count ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -94,6 +125,11 @@ rtems_status_code rtems_message_queue_receive( rtems_interval timeout ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -102,6 +138,11 @@ rtems_status_code rtems_message_queue_flush( unsigned32 *count ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -109,6 +150,12 @@ unsigned32 _Message_queue_Flush_support( Message_queue_Control *the_message_queue ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); + return RTEMS_NOT_CONFIGURED; return 0; } @@ -119,6 +166,12 @@ boolean _Message_queue_Seize( unsigned32 *size_p ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); + return RTEMS_NOT_CONFIGURED; _Thread_Executing->Wait.return_code = RTEMS_UNSATISFIED; return TRUE; } @@ -130,5 +183,10 @@ rtems_status_code _Message_queue_Submit( Message_queue_Submit_types submit_type ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } diff --git a/c/src/optman/rtems/no-part.c b/c/src/optman/rtems/no-part.c index bebb9d1461..36eb4aee12 100644 --- a/c/src/optman/rtems/no-part.c +++ b/c/src/optman/rtems/no-part.c @@ -19,6 +19,7 @@ #include #include #include +#include void _Partition_Manager_initialization( unsigned32 maximum_partitions @@ -35,6 +36,11 @@ rtems_status_code rtems_partition_create( Objects_Id *id ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -44,6 +50,11 @@ rtems_status_code rtems_partition_ident( Objects_Id *id ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -51,6 +62,11 @@ rtems_status_code rtems_partition_delete( Objects_Id id ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -59,6 +75,11 @@ rtems_status_code rtems_partition_get_buffer( void **buffer ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -67,5 +88,10 @@ rtems_status_code rtems_partition_return_buffer( void *buffer ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } diff --git a/c/src/optman/rtems/no-region.c b/c/src/optman/rtems/no-region.c index 96e815c62e..6a779fb785 100644 --- a/c/src/optman/rtems/no-region.c +++ b/c/src/optman/rtems/no-region.c @@ -20,6 +20,7 @@ #include #include #include +#include void _Region_Manager_initialization( unsigned32 maximum_regions @@ -36,6 +37,11 @@ rtems_status_code rtems_region_create( Objects_Id *id ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -44,6 +50,11 @@ rtems_status_code rtems_region_ident( Objects_Id *id ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -51,6 +62,11 @@ rtems_status_code rtems_region_delete( Objects_Id id ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -62,6 +78,11 @@ rtems_status_code rtems_region_get_segment( void **segment ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -71,6 +92,11 @@ rtems_status_code rtems_region_get_segment_size( unsigned32 *size ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -79,5 +105,10 @@ rtems_status_code rtems_region_return_segment( void *segment ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } diff --git a/c/src/optman/rtems/no-rtmon.c b/c/src/optman/rtems/no-rtmon.c index 71ec2168b1..fb064dafc5 100644 --- a/c/src/optman/rtems/no-rtmon.c +++ b/c/src/optman/rtems/no-rtmon.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -33,6 +34,11 @@ rtems_status_code rtems_rate_monotonic_create( Objects_Id *id ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -41,6 +47,11 @@ rtems_status_code rtems_rate_monotonic_ident( Objects_Id *id ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -48,6 +59,11 @@ rtems_status_code rtems_rate_monotonic_cancel( Objects_Id id ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -55,6 +71,11 @@ rtems_status_code rtems_rate_monotonic_delete( Objects_Id id ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -63,6 +84,11 @@ rtems_status_code rtems_rate_monotonic_period( rtems_interval length ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -71,11 +97,21 @@ void _Rate_monotonic_Timeout( void *ignored ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); } boolean _Rate_monotonic_Set_state( Rate_monotonic_Control *the_period ) { - return( FALSE ); + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); + return FALSE; } diff --git a/c/src/optman/rtems/no-sem.c b/c/src/optman/rtems/no-sem.c index 573d5adeb7..3f79491075 100644 --- a/c/src/optman/rtems/no-sem.c +++ b/c/src/optman/rtems/no-sem.c @@ -23,6 +23,7 @@ #include #include #include +#include void _Semaphore_Manager_initialization( unsigned32 maximum_semaphores @@ -38,6 +39,11 @@ rtems_status_code rtems_semaphore_create( Objects_Id *id ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -47,6 +53,11 @@ rtems_status_code rtems_semaphore_ident( Objects_Id *id ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -54,6 +65,11 @@ rtems_status_code rtems_semaphore_delete( Objects_Id id ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -63,6 +79,11 @@ rtems_status_code rtems_semaphore_obtain( rtems_interval timeout ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -70,6 +91,11 @@ rtems_status_code rtems_semaphore_release( Objects_Id id ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -78,6 +104,11 @@ boolean _Semaphore_Seize( rtems_option option_set ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); _Thread_Executing->Wait.return_code = RTEMS_UNSATISFIED; - return( TRUE ); + return TRUE; } diff --git a/c/src/optman/rtems/no-signal.c b/c/src/optman/rtems/no-signal.c index 59a6f8e72f..fdd90efb38 100644 --- a/c/src/optman/rtems/no-signal.c +++ b/c/src/optman/rtems/no-signal.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -31,6 +32,11 @@ rtems_status_code rtems_signal_catch( rtems_mode mode_set ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -39,6 +45,11 @@ rtems_status_code rtems_signal_send( rtems_signal_set signal_set ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } diff --git a/c/src/optman/rtems/no-timer.c b/c/src/optman/rtems/no-timer.c index 48da9ecd85..c133a48328 100644 --- a/c/src/optman/rtems/no-timer.c +++ b/c/src/optman/rtems/no-timer.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -34,6 +35,11 @@ rtems_status_code rtems_timer_create( Objects_Id *id ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -42,6 +48,11 @@ rtems_status_code rtems_timer_ident( Objects_Id *id ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -49,6 +60,11 @@ rtems_status_code rtems_timer_cancel( Objects_Id id ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -56,6 +72,11 @@ rtems_status_code rtems_timer_delete( Objects_Id id ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -66,6 +87,11 @@ rtems_status_code rtems_timer_fire_after( void *user_data ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -76,6 +102,11 @@ rtems_status_code rtems_timer_fire_when( void *user_data ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } @@ -83,5 +114,10 @@ rtems_status_code rtems_timer_reset( Objects_Id id ) { + _Internal_error_Occurred( + INTERNAL_ERROR_RTEMS_API, + FALSE, + RTEMS_NOT_CONFIGURED + ); return RTEMS_NOT_CONFIGURED; } -- cgit v1.2.3