diff options
Diffstat (limited to '')
18 files changed, 191 insertions, 69 deletions
diff --git a/c/src/exec/rtems/include/rtems.h b/c/src/exec/rtems/include/rtems.h index d0ab705f57..d1e1e6b406 100644 --- a/c/src/exec/rtems/include/rtems.h +++ b/c/src/exec/rtems/include/rtems.h @@ -24,6 +24,8 @@ extern "C" { #endif #include <rtems/system.h> +#include <rtems/types.h> + #include <rtems/init.h> #include <rtems/tasks.h> #include <rtems/intr.h> @@ -43,31 +45,7 @@ extern "C" { #include <rtems/ratemon.h> #include <rtems/mp.h> -/* - * RTEMS basic type definitions - */ - -typedef unsigned8 rtems_unsigned8; /* unsigned 8-bit value */ -typedef unsigned16 rtems_unsigned16; /* unsigned 16-bit value */ -typedef unsigned32 rtems_unsigned32; /* unsigned 32-bit value */ -typedef unsigned64 rtems_unsigned64; /* unsigned 64-bit value */ - -typedef signed8 rtems_signed8; /* signed 8-bit value */ -typedef signed16 rtems_signed16; /* signed 16-bit value */ -typedef signed32 rtems_signed32; /* signed 32-bit value */ -typedef signed64 rtems_signed64; /* signed 64-bit value */ - -typedef single_precision rtems_single; /* single precision float */ -typedef double_precision rtems_double; /* double precision float */ - -typedef boolean rtems_boolean; - -typedef Objects_Name rtems_name; -typedef Objects_Id rtems_id; - -typedef Context_Control rtems_context; -typedef Context_Control_fp rtems_context_fp; -typedef CPU_Interrupt_frame rtems_interrupt_frame; +#include <rtems/support.h> #define RTEMS_HAS_HARDWARE_FP CPU_HARDWARE_FP diff --git a/c/src/exec/rtems/include/rtems/rtems/dpmem.h b/c/src/exec/rtems/include/rtems/rtems/dpmem.h index 669eb394d8..2b6016a842 100644 --- a/c/src/exec/rtems/include/rtems/rtems/dpmem.h +++ b/c/src/exec/rtems/include/rtems/rtems/dpmem.h @@ -32,6 +32,7 @@ extern "C" { #endif +#include <rtems.h> #include <rtems/object.h> /* @@ -78,7 +79,7 @@ void _Dual_ported_memory_Manager_initialization( */ rtems_status_code rtems_port_create( - Objects_Name name, + rtems_name name, void *internal_start, void *external_start, unsigned32 length, @@ -96,7 +97,7 @@ rtems_status_code rtems_port_create( */ rtems_status_code rtems_port_ident( - Objects_Name name, + rtems_name name, Objects_Id *id ); diff --git a/c/src/exec/rtems/include/rtems/rtems/eventmp.h b/c/src/exec/rtems/include/rtems/rtems/eventmp.h index f192ea7f77..4b42cf791e 100644 --- a/c/src/exec/rtems/include/rtems/rtems/eventmp.h +++ b/c/src/exec/rtems/include/rtems/rtems/eventmp.h @@ -43,9 +43,9 @@ typedef enum { */ typedef struct { - rtems_packet_prefix Prefix; - Event_MP_Remote_operations operation; - rtems_event_set event_in; + rtems_packet_prefix Prefix; + Event_MP_Remote_operations operation; + rtems_event_set event_in; } Event_MP_Packet; /* diff --git a/c/src/exec/rtems/include/rtems/rtems/message.h b/c/src/exec/rtems/include/rtems/rtems/message.h index 04aa6dfb16..25188044be 100644 --- a/c/src/exec/rtems/include/rtems/rtems/message.h +++ b/c/src/exec/rtems/include/rtems/rtems/message.h @@ -34,6 +34,7 @@ extern "C" { #endif +#include <rtems/types.h> #include <rtems/chain.h> #include <rtems/object.h> #include <rtems/threadq.h> @@ -129,7 +130,7 @@ void _Message_queue_Manager_initialization( */ rtems_status_code rtems_message_queue_create( - Objects_Name name, + rtems_name name, unsigned32 count, unsigned32 max_message_size, rtems_attribute attribute_set, @@ -151,7 +152,7 @@ rtems_status_code rtems_message_queue_create( */ rtems_status_code rtems_message_queue_ident( - Objects_Name name, + rtems_name name, unsigned32 node, Objects_Id *id ); diff --git a/c/src/exec/rtems/include/rtems/rtems/msgmp.h b/c/src/exec/rtems/include/rtems/rtems/msgmp.h index d3e40fe123..ff84e83ed3 100644 --- a/c/src/exec/rtems/include/rtems/rtems/msgmp.h +++ b/c/src/exec/rtems/include/rtems/rtems/msgmp.h @@ -57,7 +57,7 @@ typedef enum { typedef struct { rtems_packet_prefix Prefix; Message_queue_MP_Remote_operations operation; - Objects_Name name; + rtems_name name; rtems_option option_set; Objects_Id proxy_id; unsigned32 count; @@ -78,7 +78,7 @@ typedef struct { void _Message_queue_MP_Send_process_packet ( Message_queue_MP_Remote_operations operation, Objects_Id message_queue_id, - Objects_Name name, + rtems_name name, Objects_Id proxy_id ); diff --git a/c/src/exec/rtems/include/rtems/rtems/part.h b/c/src/exec/rtems/include/rtems/rtems/part.h index e639029dc8..230cf029f7 100644 --- a/c/src/exec/rtems/include/rtems/rtems/part.h +++ b/c/src/exec/rtems/include/rtems/rtems/part.h @@ -31,6 +31,7 @@ extern "C" { #endif +#include <rtems.h> #include <rtems/address.h> #include <rtems/attr.h> #include <rtems/object.h> @@ -83,7 +84,7 @@ void _Partition_Manager_initialization( */ rtems_status_code rtems_partition_create( - Objects_Name name, + rtems_name name, void *starting_address, unsigned32 length, unsigned32 buffer_size, @@ -106,7 +107,7 @@ rtems_status_code rtems_partition_create( */ rtems_status_code rtems_partition_ident( - Objects_Name name, + rtems_name name, unsigned32 node, Objects_Id *id ); diff --git a/c/src/exec/rtems/include/rtems/rtems/partmp.h b/c/src/exec/rtems/include/rtems/rtems/partmp.h index 9c551bd890..4b3bf876ff 100644 --- a/c/src/exec/rtems/include/rtems/rtems/partmp.h +++ b/c/src/exec/rtems/include/rtems/rtems/partmp.h @@ -48,9 +48,9 @@ typedef enum { */ typedef struct { - rtems_packet_prefix Prefix; + rtems_packet_prefix Prefix; Partition_MP_Remote_operations operation; - Objects_Name name; + rtems_name name; void *buffer; Objects_Id proxy_id; } Partition_MP_Packet; @@ -67,7 +67,7 @@ typedef struct { void _Partition_MP_Send_process_packet ( Partition_MP_Remote_operations operation, Objects_Id partition_id, - Objects_Name name, + rtems_name name, Objects_Id proxy_id ); diff --git a/c/src/exec/rtems/include/rtems/rtems/ratemon.h b/c/src/exec/rtems/include/rtems/rtems/ratemon.h index 86acfb9a38..75a9963888 100644 --- a/c/src/exec/rtems/include/rtems/rtems/ratemon.h +++ b/c/src/exec/rtems/include/rtems/rtems/ratemon.h @@ -29,6 +29,7 @@ extern "C" { #endif +#include <rtems.h> #include <rtems/object.h> #include <rtems/thread.h> #include <rtems/watchdog.h> @@ -88,7 +89,7 @@ void _Rate_monotonic_Manager_initialization( */ rtems_status_code rtems_rate_monotonic_create( - Objects_Name name, + rtems_name name, Objects_Id *id ); @@ -104,7 +105,7 @@ rtems_status_code rtems_rate_monotonic_create( */ rtems_status_code rtems_rate_monotonic_ident( - Objects_Name name, + rtems_name name, Objects_Id *id ); diff --git a/c/src/exec/rtems/include/rtems/rtems/region.h b/c/src/exec/rtems/include/rtems/rtems/region.h index c31e193c33..a5f6aa761c 100644 --- a/c/src/exec/rtems/include/rtems/rtems/region.h +++ b/c/src/exec/rtems/include/rtems/rtems/region.h @@ -30,6 +30,7 @@ extern "C" { #endif +#include <rtems.h> #include <rtems/object.h> #include <rtems/threadq.h> #include <rtems/heap.h> @@ -86,7 +87,7 @@ void _Region_Manager_initialization( */ rtems_status_code rtems_region_create( - Objects_Name name, + rtems_name name, void *starting_address, unsigned32 length, unsigned32 page_size, @@ -123,7 +124,7 @@ rtems_status_code rtems_region_extend( */ rtems_status_code rtems_region_ident( - Objects_Name name, + rtems_name name, Objects_Id *id ); diff --git a/c/src/exec/rtems/include/rtems/rtems/regionmp.h b/c/src/exec/rtems/include/rtems/rtems/regionmp.h index f414925e1f..9756103a60 100644 --- a/c/src/exec/rtems/include/rtems/rtems/regionmp.h +++ b/c/src/exec/rtems/include/rtems/rtems/regionmp.h @@ -48,10 +48,10 @@ typedef enum { */ typedef struct { - rtems_packet_prefix Prefix; + rtems_packet_prefix Prefix; Region_MP_Remote_operations operation; - Objects_Name name; - rtems_option option_set; + rtems_name name; + rtems_option option_set; unsigned32 size; Objects_Id proxy_id; void *segment; @@ -69,7 +69,7 @@ typedef struct { void _Region_MP_Send_process_packet ( Region_MP_Remote_operations operation, Objects_Id region_id, - Objects_Name name, + rtems_name name, Objects_Id proxy_id ); diff --git a/c/src/exec/rtems/include/rtems/rtems/sem.h b/c/src/exec/rtems/include/rtems/rtems/sem.h index 66f5ab82b8..e70253dcb1 100644 --- a/c/src/exec/rtems/include/rtems/rtems/sem.h +++ b/c/src/exec/rtems/include/rtems/rtems/sem.h @@ -31,6 +31,7 @@ extern "C" { #endif +#include <rtems.h> #include <rtems/attr.h> #include <rtems/object.h> #include <rtems/threadq.h> @@ -81,7 +82,7 @@ void _Semaphore_Manager_initialization( */ rtems_status_code rtems_semaphore_create( - Objects_Name name, + rtems_name name, unsigned32 count, rtems_attribute attribute_set, Objects_Id *id @@ -102,7 +103,7 @@ rtems_status_code rtems_semaphore_create( */ rtems_status_code rtems_semaphore_ident( - Objects_Name name, + rtems_name name, unsigned32 node, Objects_Id *id ); diff --git a/c/src/exec/rtems/include/rtems/rtems/semmp.h b/c/src/exec/rtems/include/rtems/rtems/semmp.h index 882812a457..915e18164c 100644 --- a/c/src/exec/rtems/include/rtems/rtems/semmp.h +++ b/c/src/exec/rtems/include/rtems/rtems/semmp.h @@ -49,11 +49,11 @@ typedef enum { */ typedef struct { - rtems_packet_prefix Prefix; - Semaphore_MP_Remote_operations operation; - Objects_Name name; - rtems_option option_set; - Objects_Id proxy_id; + rtems_packet_prefix Prefix; + Semaphore_MP_Remote_operations operation; + rtems_name name; + rtems_option option_set; + Objects_Id proxy_id; } Semaphore_MP_Packet; /* @@ -68,7 +68,7 @@ typedef struct { void _Semaphore_MP_Send_process_packet ( Semaphore_MP_Remote_operations operation, Objects_Id semaphore_id, - Objects_Name name, + rtems_name name, Objects_Id proxy_id ); diff --git a/c/src/exec/rtems/include/rtems/rtems/signalmp.h b/c/src/exec/rtems/include/rtems/rtems/signalmp.h index 80aa3b7d60..b72f476bee 100644 --- a/c/src/exec/rtems/include/rtems/rtems/signalmp.h +++ b/c/src/exec/rtems/include/rtems/rtems/signalmp.h @@ -43,9 +43,9 @@ typedef enum { */ typedef struct { - rtems_packet_prefix Prefix; - Signal_MP_Remote_operations operation; - rtems_signal_set signal_in; + rtems_packet_prefix Prefix; + Signal_MP_Remote_operations operation; + rtems_signal_set signal_in; } Signal_MP_Packet; /* diff --git a/c/src/exec/rtems/include/rtems/rtems/support.h b/c/src/exec/rtems/include/rtems/rtems/support.h new file mode 100644 index 0000000000..c6452e0847 --- /dev/null +++ b/c/src/exec/rtems/include/rtems/rtems/support.h @@ -0,0 +1,80 @@ +/* support.h + * + * This include file contains information about support functions for + * the RTEMS API. + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#ifndef __RTEMS_RTEMS_SUPPORT_h +#define __RTEMS_RTEMS_SUPPORT_h + +#ifdef __cplusplus +extern "C" { +#endif + +#include <rtems/types.h> + +/* + * rtems_is_name_valid + * + * DESCRIPTION: + * + * This function returns TRUE if the name is valid, and FALSE otherwise. + */ + +STATIC INLINE rtems_boolean rtems_is_name_valid ( + rtems_name name +); + +/* + * rtems_build_name + * + * DESCRIPTION: + * + * This function returns an object name composed of the four characters + * C1, C2, C3, and C4. + * + * NOTE: + * + * This must be implemented as a macro for use in Configuration Tables. + * + */ + +#define rtems_build_name( _C1, _C2, _C3, _C4 ) \ + ( (_C1) << 24 | (_C2) << 16 | (_C3) << 8 | (_C4) ) + +/* + * rtems_name_to_characters + * + * DESCRIPTION: + * + * This function breaks the object name into the four component + * characters C1, C2, C3, and C4. + * + */ + +STATIC INLINE void rtems_name_to_characters( + rtems_name name, + char *c1, + char *c2, + char *c3, + char *c4 +); + +#include <rtems/support.inl> + +#ifdef __cplusplus +} +#endif + +#endif +/* end of include file */ diff --git a/c/src/exec/rtems/include/rtems/rtems/taskmp.h b/c/src/exec/rtems/include/rtems/rtems/taskmp.h index a83723bd9f..d05277a69c 100644 --- a/c/src/exec/rtems/include/rtems/rtems/taskmp.h +++ b/c/src/exec/rtems/include/rtems/rtems/taskmp.h @@ -54,12 +54,12 @@ typedef enum { */ typedef struct { - rtems_packet_prefix Prefix; - RTEMS_tasks_MP_Remote_operations operation; - Objects_Name name; - rtems_task_priority the_priority; - unsigned32 notepad; - unsigned32 note; + rtems_packet_prefix Prefix; + RTEMS_tasks_MP_Remote_operations operation; + rtems_name name; + rtems_task_priority the_priority; + unsigned32 notepad; + unsigned32 note; } RTEMS_tasks_MP_Packet; /* @@ -74,7 +74,7 @@ typedef struct { void _RTEMS_tasks_MP_Send_process_packet ( RTEMS_tasks_MP_Remote_operations operation, Objects_Id task_id, - Objects_Name name + rtems_name name ); /* diff --git a/c/src/exec/rtems/include/rtems/rtems/tasks.h b/c/src/exec/rtems/include/rtems/rtems/tasks.h index d92913548e..88bf8e0e65 100644 --- a/c/src/exec/rtems/include/rtems/rtems/tasks.h +++ b/c/src/exec/rtems/include/rtems/rtems/tasks.h @@ -38,6 +38,7 @@ extern "C" { #endif +#include <rtems.h> #include <rtems/message.h> #include <rtems/object.h> #include <rtems/part.h> @@ -74,7 +75,7 @@ extern "C" { */ rtems_status_code rtems_task_create( - Objects_Name name, + rtems_name name, rtems_task_priority initial_priority, unsigned32 stack_size, rtems_mode initial_modes, @@ -97,7 +98,7 @@ rtems_status_code rtems_task_create( */ rtems_status_code rtems_task_ident( - Objects_Name name, + rtems_name name, unsigned32 node, Objects_Id *id ); diff --git a/c/src/exec/rtems/include/rtems/rtems/timer.h b/c/src/exec/rtems/include/rtems/rtems/timer.h index f6ccb5f4a1..bab05378c7 100644 --- a/c/src/exec/rtems/include/rtems/rtems/timer.h +++ b/c/src/exec/rtems/include/rtems/rtems/timer.h @@ -33,6 +33,7 @@ extern "C" { #endif +#include <rtems.h> #include <rtems/object.h> #include <rtems/tod.h> #include <rtems/watchdog.h> @@ -95,7 +96,7 @@ void _Timer_Manager_initialization( */ rtems_status_code rtems_timer_create( - Objects_Name name, + rtems_name name, Objects_Id *id ); @@ -111,7 +112,7 @@ rtems_status_code rtems_timer_create( */ rtems_status_code rtems_timer_ident( - Objects_Name name, + rtems_name name, Objects_Id *id ); diff --git a/c/src/exec/rtems/include/rtems/rtems/types.h b/c/src/exec/rtems/include/rtems/rtems/types.h new file mode 100644 index 0000000000..2a5cb6f4fd --- /dev/null +++ b/c/src/exec/rtems/include/rtems/rtems/types.h @@ -0,0 +1,56 @@ +/* types.h + * + * This include file defines the types used by the RTEMS API. + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#ifndef __RTEMS_RTEMS_TYPES_h +#define __RTEMS_RTEMS_TYPES_h + +#ifdef __cplusplus +extern "C" { +#endif + +#include <rtems/object.h> + +/* + * RTEMS basic type definitions + */ + +typedef unsigned8 rtems_unsigned8; /* unsigned 8-bit value */ +typedef unsigned16 rtems_unsigned16; /* unsigned 16-bit value */ +typedef unsigned32 rtems_unsigned32; /* unsigned 32-bit value */ +typedef unsigned64 rtems_unsigned64; /* unsigned 64-bit value */ + +typedef signed8 rtems_signed8; /* signed 8-bit value */ +typedef signed16 rtems_signed16; /* signed 16-bit value */ +typedef signed32 rtems_signed32; /* signed 32-bit value */ +typedef signed64 rtems_signed64; /* signed 64-bit value */ + +typedef single_precision rtems_single; /* single precision float */ +typedef double_precision rtems_double; /* double precision float */ + +typedef boolean rtems_boolean; + +typedef unsigned32 rtems_name; +typedef Objects_Id rtems_id; + +typedef Context_Control rtems_context; +typedef Context_Control_fp rtems_context_fp; +typedef CPU_Interrupt_frame rtems_interrupt_frame; + +#ifdef __cplusplus +} +#endif + +#endif +/* end of include file */ |