diff options
Diffstat (limited to 'cpukit/rtems')
35 files changed, 409 insertions, 146 deletions
diff --git a/cpukit/rtems/include/rtems.h b/cpukit/rtems/include/rtems.h index d0ab705f57..d1e1e6b406 100644 --- a/cpukit/rtems/include/rtems.h +++ b/cpukit/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/cpukit/rtems/include/rtems/rtems/dpmem.h b/cpukit/rtems/include/rtems/rtems/dpmem.h index 669eb394d8..2b6016a842 100644 --- a/cpukit/rtems/include/rtems/rtems/dpmem.h +++ b/cpukit/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/cpukit/rtems/include/rtems/rtems/eventmp.h b/cpukit/rtems/include/rtems/rtems/eventmp.h index f192ea7f77..4b42cf791e 100644 --- a/cpukit/rtems/include/rtems/rtems/eventmp.h +++ b/cpukit/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/cpukit/rtems/include/rtems/rtems/message.h b/cpukit/rtems/include/rtems/rtems/message.h index 04aa6dfb16..25188044be 100644 --- a/cpukit/rtems/include/rtems/rtems/message.h +++ b/cpukit/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/cpukit/rtems/include/rtems/rtems/msgmp.h b/cpukit/rtems/include/rtems/rtems/msgmp.h index d3e40fe123..ff84e83ed3 100644 --- a/cpukit/rtems/include/rtems/rtems/msgmp.h +++ b/cpukit/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/cpukit/rtems/include/rtems/rtems/part.h b/cpukit/rtems/include/rtems/rtems/part.h index e639029dc8..230cf029f7 100644 --- a/cpukit/rtems/include/rtems/rtems/part.h +++ b/cpukit/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/cpukit/rtems/include/rtems/rtems/partmp.h b/cpukit/rtems/include/rtems/rtems/partmp.h index 9c551bd890..4b3bf876ff 100644 --- a/cpukit/rtems/include/rtems/rtems/partmp.h +++ b/cpukit/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/cpukit/rtems/include/rtems/rtems/ratemon.h b/cpukit/rtems/include/rtems/rtems/ratemon.h index 86acfb9a38..75a9963888 100644 --- a/cpukit/rtems/include/rtems/rtems/ratemon.h +++ b/cpukit/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/cpukit/rtems/include/rtems/rtems/region.h b/cpukit/rtems/include/rtems/rtems/region.h index c31e193c33..a5f6aa761c 100644 --- a/cpukit/rtems/include/rtems/rtems/region.h +++ b/cpukit/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/cpukit/rtems/include/rtems/rtems/regionmp.h b/cpukit/rtems/include/rtems/rtems/regionmp.h index f414925e1f..9756103a60 100644 --- a/cpukit/rtems/include/rtems/rtems/regionmp.h +++ b/cpukit/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/cpukit/rtems/include/rtems/rtems/sem.h b/cpukit/rtems/include/rtems/rtems/sem.h index 66f5ab82b8..e70253dcb1 100644 --- a/cpukit/rtems/include/rtems/rtems/sem.h +++ b/cpukit/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/cpukit/rtems/include/rtems/rtems/semmp.h b/cpukit/rtems/include/rtems/rtems/semmp.h index 882812a457..915e18164c 100644 --- a/cpukit/rtems/include/rtems/rtems/semmp.h +++ b/cpukit/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/cpukit/rtems/include/rtems/rtems/signalmp.h b/cpukit/rtems/include/rtems/rtems/signalmp.h index 80aa3b7d60..b72f476bee 100644 --- a/cpukit/rtems/include/rtems/rtems/signalmp.h +++ b/cpukit/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/cpukit/rtems/include/rtems/rtems/support.h b/cpukit/rtems/include/rtems/rtems/support.h new file mode 100644 index 0000000000..c6452e0847 --- /dev/null +++ b/cpukit/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/cpukit/rtems/include/rtems/rtems/taskmp.h b/cpukit/rtems/include/rtems/rtems/taskmp.h index a83723bd9f..d05277a69c 100644 --- a/cpukit/rtems/include/rtems/rtems/taskmp.h +++ b/cpukit/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/cpukit/rtems/include/rtems/rtems/tasks.h b/cpukit/rtems/include/rtems/rtems/tasks.h index d92913548e..88bf8e0e65 100644 --- a/cpukit/rtems/include/rtems/rtems/tasks.h +++ b/cpukit/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/cpukit/rtems/include/rtems/rtems/timer.h b/cpukit/rtems/include/rtems/rtems/timer.h index f6ccb5f4a1..bab05378c7 100644 --- a/cpukit/rtems/include/rtems/rtems/timer.h +++ b/cpukit/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/cpukit/rtems/include/rtems/rtems/types.h b/cpukit/rtems/include/rtems/rtems/types.h new file mode 100644 index 0000000000..2a5cb6f4fd --- /dev/null +++ b/cpukit/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 */ diff --git a/cpukit/rtems/inline/rtems/rtems/support.inl b/cpukit/rtems/inline/rtems/rtems/support.inl new file mode 100644 index 0000000000..2f98a98ad0 --- /dev/null +++ b/cpukit/rtems/inline/rtems/rtems/support.inl @@ -0,0 +1,54 @@ +/* support.inl + * + * This include file contains the static inline implementation of all + * of the inlined routines specific to 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_SUPPORT_inl +#define __RTEMS_SUPPORT_inl + +/*PAGE + * + * rtems_is_name_valid + * + */ + +STATIC INLINE rtems_boolean rtems_is_name_valid ( + rtems_name name +) +{ + return ( name != 0 ); +} + +/*PAGE + * + * rtems_name_to_characters + * + */ + +STATIC INLINE void rtems_name_to_characters( + rtems_name name, + char *c1, + char *c2, + char *c3, + char *c4 +) +{ + *c1 = (name >> 24) & 0xff; + *c2 = (name >> 16) & 0xff; + *c3 = (name >> 8) & 0xff; + *c4 = name & 0xff; +} + +#endif +/* end of include file */ diff --git a/cpukit/rtems/inline/rtems/rtems/tasks.inl b/cpukit/rtems/inline/rtems/rtems/tasks.inl index d5df18831a..10d3e3c197 100644 --- a/cpukit/rtems/inline/rtems/rtems/tasks.inl +++ b/cpukit/rtems/inline/rtems/rtems/tasks.inl @@ -17,6 +17,11 @@ #ifndef __RTEMS_TASKS_inl #define __RTEMS_TASKS_inl +#include <rtems/msgmp.h> +#include <rtems/partmp.h> +#include <rtems/regionmp.h> +#include <rtems/semmp.h> + /*PAGE * * _RTEMS_tasks_Allocate diff --git a/cpukit/rtems/macros/rtems/rtems/support.inl b/cpukit/rtems/macros/rtems/rtems/support.inl new file mode 100644 index 0000000000..a25b445aff --- /dev/null +++ b/cpukit/rtems/macros/rtems/rtems/support.inl @@ -0,0 +1,44 @@ +/* support.inl + * + * This include file contains the macros implementation of all + * of the inlined routines specific to 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_SUPPORT_inl +#define __RTEMS_SUPPORT_inl + +/*PAGE + * + * rtems_is_name_valid + * + */ + +#define rtems_is_name_valid( _name ) \ + ( (_name) != 0 ) + +/*PAGE + * + * rtems_name_to_characters + * + */ + +#define rtems_name_to_characters( _name, _c1, _c2, _c3, _c4 ) \ + { \ + (*(_c1) = ((_name) >> 24) & 0xff; \ + (*(_c2) = ((_name) >> 16) & 0xff; \ + (*(_c3) = ((_name) >> 8) & 0xff; \ + (*(_c4) = ((_name)) & 0xff; \ + } + +#endif +/* end of include file */ diff --git a/cpukit/rtems/macros/rtems/rtems/tasks.inl b/cpukit/rtems/macros/rtems/rtems/tasks.inl index 7b40cbf7fd..8fec704ea4 100644 --- a/cpukit/rtems/macros/rtems/rtems/tasks.inl +++ b/cpukit/rtems/macros/rtems/rtems/tasks.inl @@ -17,6 +17,11 @@ #ifndef __RTEMS_TASKS_inl #define __RTEMS_TASKS_inl +#include <rtems/msgmp.h> +#include <rtems/partmp.h> +#include <rtems/regionmp.h> +#include <rtems/semmp.h> + /*PAGE * * _RTEMS_tasks_Allocate diff --git a/cpukit/rtems/src/dpmem.c b/cpukit/rtems/src/dpmem.c index b594ecd00e..ea2469f4c5 100644 --- a/cpukit/rtems/src/dpmem.c +++ b/cpukit/rtems/src/dpmem.c @@ -13,6 +13,7 @@ */ #include <rtems/system.h> +#include <rtems/support.h> #include <rtems/address.h> #include <rtems/dpmem.h> #include <rtems/object.h> @@ -36,11 +37,13 @@ void _Dual_ported_memory_Manager_initialization( ) { _Objects_Initialize_information( - &_Dual_ported_memory_Information, - OBJECTS_RTEMS_PORTS, - FALSE, - maximum_ports, - sizeof( Dual_ported_memory_Control ) + &_Dual_ported_memory_Information, + OBJECTS_RTEMS_PORTS, + FALSE, + maximum_ports, + sizeof( Dual_ported_memory_Control ), + FALSE, + RTEMS_MAXIMUM_NAME_LENGTH ); } @@ -64,7 +67,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, @@ -73,7 +76,7 @@ rtems_status_code rtems_port_create( { register Dual_ported_memory_Control *the_port; - if ( !_Objects_Is_name_valid( name) ) + if ( !rtems_is_name_valid( name) ) return ( RTEMS_INVALID_NAME ); if ( !_Addresses_Is_aligned( internal_start ) || @@ -93,8 +96,12 @@ rtems_status_code rtems_port_create( the_port->external_base = external_start; the_port->length = length - 1; - _Objects_Open( &_Dual_ported_memory_Information, - &the_port->Object, name ); + _Objects_Open( + &_Dual_ported_memory_Information, + &the_port->Object, + &name + ); + *id = the_port->Object.id; _Thread_Enable_dispatch(); return( RTEMS_SUCCESSFUL ); @@ -118,14 +125,14 @@ rtems_status_code rtems_port_create( */ rtems_status_code rtems_port_ident( - Objects_Name name, + rtems_name name, Objects_Id *id ) { return( _Objects_Name_to_id( &_Dual_ported_memory_Information, - name, + &name, RTEMS_SEARCH_ALL_NODES, id ) diff --git a/cpukit/rtems/src/msg.c b/cpukit/rtems/src/msg.c index 49d7d0b3f3..d7c456f90a 100644 --- a/cpukit/rtems/src/msg.c +++ b/cpukit/rtems/src/msg.c @@ -22,6 +22,7 @@ #include <rtems/object.h> #include <rtems/options.h> #include <rtems/states.h> +#include <rtems/support.h> #include <rtems/thread.h> #include <rtems/wkspace.h> #include <rtems/mpci.h> @@ -48,7 +49,9 @@ void _Message_queue_Manager_initialization( OBJECTS_RTEMS_MESSAGE_QUEUES, TRUE, maximum_message_queues, - sizeof( Message_queue_Control ) + sizeof( Message_queue_Control ), + FALSE, + RTEMS_MAXIMUM_NAME_LENGTH ); } @@ -130,7 +133,7 @@ failed: */ rtems_status_code rtems_message_queue_create( - Objects_Name name, + rtems_name name, unsigned32 count, unsigned32 max_message_size, rtems_attribute attribute_set, @@ -139,7 +142,7 @@ rtems_status_code rtems_message_queue_create( { register Message_queue_Control *the_message_queue; - if ( !_Objects_Is_name_valid( name ) ) + if ( !rtems_is_name_valid( name ) ) return ( RTEMS_INVALID_NAME ); if ( _Attributes_Is_global( attribute_set ) && @@ -194,8 +197,11 @@ rtems_status_code rtems_message_queue_create( _Thread_queue_Initialize( &the_message_queue->Wait_queue, attribute_set, STATES_WAITING_FOR_MESSAGE ); - _Objects_Open( &_Message_queue_Information, - &the_message_queue->Object, name ); + _Objects_Open( + &_Message_queue_Information, + &the_message_queue->Object, + &name + ); *id = the_message_queue->Object.id; @@ -230,13 +236,17 @@ 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 ) { - return( _Objects_Name_to_id( &_Message_queue_Information, name, - node, id ) ); + return _Objects_Name_to_id( + &_Message_queue_Information, + &name, + node, + id + ); } /*PAGE diff --git a/cpukit/rtems/src/msgmp.c b/cpukit/rtems/src/msgmp.c index 75e83b5bf8..37ce2c9453 100644 --- a/cpukit/rtems/src/msgmp.c +++ b/cpukit/rtems/src/msgmp.c @@ -32,7 +32,7 @@ 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 ) { @@ -434,7 +434,7 @@ void _Message_queue_MP_Send_extract_proxy ( _Message_queue_MP_Send_process_packet( MESSAGE_QUEUE_MP_EXTRACT_PROXY, the_thread->Wait.id, - (Objects_Name) 0, + (rtems_name) 0, the_thread->Object.id ); } diff --git a/cpukit/rtems/src/part.c b/cpukit/rtems/src/part.c index 7cf0fe691c..b1e284c669 100644 --- a/cpukit/rtems/src/part.c +++ b/cpukit/rtems/src/part.c @@ -14,6 +14,7 @@ */ #include <rtems/system.h> +#include <rtems/support.h> #include <rtems/address.h> #include <rtems/config.h> #include <rtems/object.h> @@ -42,7 +43,9 @@ void _Partition_Manager_initialization( OBJECTS_RTEMS_PARTITIONS, TRUE, maximum_partitions, - sizeof( Partition_Control ) + sizeof( Partition_Control ), + FALSE, + RTEMS_MAXIMUM_NAME_LENGTH ); } @@ -69,7 +72,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, @@ -79,7 +82,7 @@ rtems_status_code rtems_partition_create( { register Partition_Control *the_partition; - if ( !_Objects_Is_name_valid( name ) ) + if ( !rtems_is_name_valid( name ) ) return ( RTEMS_INVALID_NAME ); if ( length == 0 || buffer_size == 0 || length < buffer_size || @@ -118,7 +121,7 @@ rtems_status_code rtems_partition_create( _Chain_Initialize( &the_partition->Memory, starting_address, length / buffer_size, buffer_size ); - _Objects_Open( &_Partition_Information, &the_partition->Object, name ); + _Objects_Open( &_Partition_Information, &the_partition->Object, &name ); *id = the_partition->Object.id; if ( _Attributes_Is_global( attribute_set ) ) @@ -152,12 +155,12 @@ rtems_status_code rtems_partition_create( */ rtems_status_code rtems_partition_ident( - Objects_Name name, + rtems_name name, unsigned32 node, Objects_Id *id ) { - return( _Objects_Name_to_id( &_Partition_Information, name, node, id ) ); + return _Objects_Name_to_id( &_Partition_Information, &name, node, id ); } /*PAGE diff --git a/cpukit/rtems/src/partmp.c b/cpukit/rtems/src/partmp.c index 9cc1723106..074165777b 100644 --- a/cpukit/rtems/src/partmp.c +++ b/cpukit/rtems/src/partmp.c @@ -30,7 +30,7 @@ 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 ) { @@ -280,7 +280,7 @@ void _Partition_MP_Send_extract_proxy ( _Partition_MP_Send_process_packet( PARTITION_MP_EXTRACT_PROXY, the_thread->Wait.id, - (Objects_Name) 0, + (rtems_name) 0, the_thread->Object.id ); diff --git a/cpukit/rtems/src/ratemon.c b/cpukit/rtems/src/ratemon.c index 86f1534d98..6e84c56fb3 100644 --- a/cpukit/rtems/src/ratemon.c +++ b/cpukit/rtems/src/ratemon.c @@ -14,6 +14,7 @@ */ #include <rtems/system.h> +#include <rtems/support.h> #include <rtems/isr.h> #include <rtems/object.h> #include <rtems/ratemon.h> @@ -40,11 +41,13 @@ void _Rate_monotonic_Manager_initialization( ) { _Objects_Initialize_information( - &_Rate_monotonic_Information, - OBJECTS_RTEMS_PERIODS, - FALSE, - maximum_periods, - sizeof( Rate_monotonic_Control ) + &_Rate_monotonic_Information, + OBJECTS_RTEMS_PERIODS, + FALSE, + maximum_periods, + sizeof( Rate_monotonic_Control ), + FALSE, + RTEMS_MAXIMUM_NAME_LENGTH ); } @@ -66,13 +69,13 @@ void _Rate_monotonic_Manager_initialization( */ rtems_status_code rtems_rate_monotonic_create( - Objects_Name name, + rtems_name name, Objects_Id *id ) { Rate_monotonic_Control *the_period; - if ( !_Objects_Is_name_valid( name ) ) + if ( !rtems_is_name_valid( name ) ) return( RTEMS_INVALID_NAME ); _Thread_Disable_dispatch(); /* to prevent deletion */ @@ -87,7 +90,7 @@ rtems_status_code rtems_rate_monotonic_create( the_period->owner = _Thread_Executing; the_period->state = RATE_MONOTONIC_INACTIVE; - _Objects_Open( &_Rate_monotonic_Information, &the_period->Object, name ); + _Objects_Open( &_Rate_monotonic_Information, &the_period->Object, &name ); *id = the_period->Object.id; _Thread_Enable_dispatch(); @@ -112,13 +115,13 @@ rtems_status_code rtems_rate_monotonic_create( */ rtems_status_code rtems_rate_monotonic_ident( - Objects_Name name, + rtems_name name, Objects_Id *id ) { return _Objects_Name_to_id( &_Rate_monotonic_Information, - name, + &name, RTEMS_SEARCH_LOCAL_NODE, id ); diff --git a/cpukit/rtems/src/region.c b/cpukit/rtems/src/region.c index 40bd7ffa26..90916dcc3a 100644 --- a/cpukit/rtems/src/region.c +++ b/cpukit/rtems/src/region.c @@ -14,6 +14,7 @@ */ #include <rtems/system.h> +#include <rtems/support.h> #include <rtems/config.h> #include <rtems/object.h> #include <rtems/options.h> @@ -38,12 +39,14 @@ void _Region_Manager_initialization( ) { _Objects_Initialize_information( - &_Region_Information, - OBJECTS_RTEMS_REGIONS, - FALSE, - maximum_regions, - sizeof( Region_Control ) - ); + &_Region_Information, + OBJECTS_RTEMS_REGIONS, + FALSE, + maximum_regions, + sizeof( Region_Control ), + FALSE, + RTEMS_MAXIMUM_NAME_LENGTH + ); } /*PAGE @@ -68,7 +71,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, @@ -78,7 +81,7 @@ rtems_status_code rtems_region_create( { Region_Control *the_region; - if ( !_Objects_Is_name_valid( name ) ) + if ( !rtems_is_name_valid( name ) ) return ( RTEMS_INVALID_NAME ); if ( !_Addresses_Is_aligned( starting_address ) ) @@ -111,7 +114,7 @@ rtems_status_code rtems_region_create( _Thread_queue_Initialize( &the_region->Wait_queue, attribute_set, STATES_WAITING_FOR_SEGMENT ); - _Objects_Open( &_Region_Information, &the_region->Object, name ); + _Objects_Open( &_Region_Information, &the_region->Object, &name ); *id = the_region->Object.id; _Thread_Enable_dispatch(); @@ -136,13 +139,13 @@ rtems_status_code rtems_region_create( */ rtems_status_code rtems_region_ident( - Objects_Name name, + rtems_name name, Objects_Id *id ) { return _Objects_Name_to_id( &_Region_Information, - name, + &name, RTEMS_SEARCH_LOCAL_NODE, id ); diff --git a/cpukit/rtems/src/regionmp.c b/cpukit/rtems/src/regionmp.c index 558ae1639a..07de556acc 100644 --- a/cpukit/rtems/src/regionmp.c +++ b/cpukit/rtems/src/regionmp.c @@ -30,7 +30,7 @@ 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 ) { @@ -289,7 +289,7 @@ void _Region_MP_Send_extract_proxy ( _Region_MP_Send_process_packet( REGION_MP_EXTRACT_PROXY, the_thread->Wait.id, - (Objects_Name) 0, + (rtems_name) 0, the_thread->Object.id ); } diff --git a/cpukit/rtems/src/rtemstimer.c b/cpukit/rtems/src/rtemstimer.c index ec55c3eaf9..2aad758269 100644 --- a/cpukit/rtems/src/rtemstimer.c +++ b/cpukit/rtems/src/rtemstimer.c @@ -14,6 +14,7 @@ */ #include <rtems/system.h> +#include <rtems/support.h> #include <rtems/object.h> #include <rtems/thread.h> #include <rtems/timer.h> @@ -37,11 +38,13 @@ void _Timer_Manager_initialization( ) { _Objects_Initialize_information( - &_Timer_Information, - OBJECTS_RTEMS_TIMERS, - FALSE, - maximum_timers, - sizeof( Timer_Control ) + &_Timer_Information, + OBJECTS_RTEMS_TIMERS, + FALSE, + maximum_timers, + sizeof( Timer_Control ), + FALSE, + RTEMS_MAXIMUM_NAME_LENGTH ); } @@ -62,13 +65,13 @@ void _Timer_Manager_initialization( */ rtems_status_code rtems_timer_create( - Objects_Name name, + rtems_name name, Objects_Id *id ) { Timer_Control *the_timer; - if ( !_Objects_Is_name_valid( name ) ) + if ( !rtems_is_name_valid( name ) ) return ( RTEMS_INVALID_NAME ); _Thread_Disable_dispatch(); /* to prevent deletion */ @@ -82,7 +85,7 @@ rtems_status_code rtems_timer_create( the_timer->the_class = TIMER_DORMANT; - _Objects_Open( &_Timer_Information, &the_timer->Object, name ); + _Objects_Open( &_Timer_Information, &the_timer->Object, &name ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); @@ -107,13 +110,13 @@ rtems_status_code rtems_timer_create( */ rtems_status_code rtems_timer_ident( - Objects_Name name, + rtems_name name, Objects_Id *id ) { return _Objects_Name_to_id( &_Timer_Information, - name, + &name, RTEMS_SEARCH_LOCAL_NODE, id ); diff --git a/cpukit/rtems/src/sem.c b/cpukit/rtems/src/sem.c index 340a4fa947..46dff9cdd7 100644 --- a/cpukit/rtems/src/sem.c +++ b/cpukit/rtems/src/sem.c @@ -27,6 +27,7 @@ */ #include <rtems/system.h> +#include <rtems/support.h> #include <rtems/attr.h> #include <rtems/config.h> #include <rtems/isr.h> @@ -56,10 +57,12 @@ void _Semaphore_Manager_initialization( { _Objects_Initialize_information( &_Semaphore_Information, - OBJECTS_RTEMS_SEMAPHORES, + OBJECTS_RTEMS_SEMAPHORES, TRUE, maximum_semaphores, - sizeof( Semaphore_Control ) + sizeof( Semaphore_Control ), + FALSE, + RTEMS_MAXIMUM_NAME_LENGTH ); } @@ -83,7 +86,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 @@ -91,7 +94,7 @@ rtems_status_code rtems_semaphore_create( { register Semaphore_Control *the_semaphore; - if ( !_Objects_Is_name_valid( name ) ) + if ( !rtems_is_name_valid( name ) ) return ( RTEMS_INVALID_NAME ); if ( _Attributes_Is_global( attribute_set ) ) { @@ -147,7 +150,7 @@ rtems_status_code rtems_semaphore_create( _Thread_queue_Initialize( &the_semaphore->Wait_queue, attribute_set, STATES_WAITING_FOR_SEMAPHORE ); - _Objects_Open( &_Semaphore_Information, &the_semaphore->Object, name ); + _Objects_Open( &_Semaphore_Information, &the_semaphore->Object, &name ); *id = the_semaphore->Object.id; @@ -181,12 +184,12 @@ rtems_status_code rtems_semaphore_create( */ rtems_status_code rtems_semaphore_ident( - Objects_Name name, + rtems_name name, unsigned32 node, Objects_Id *id ) { - return( _Objects_Name_to_id( &_Semaphore_Information, name, node, id ) ); + return( _Objects_Name_to_id( &_Semaphore_Information, &name, node, id ) ); } /*PAGE diff --git a/cpukit/rtems/src/semmp.c b/cpukit/rtems/src/semmp.c index d131d48150..3be9fafb5f 100644 --- a/cpukit/rtems/src/semmp.c +++ b/cpukit/rtems/src/semmp.c @@ -31,7 +31,7 @@ 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 ) { @@ -286,7 +286,7 @@ void _Semaphore_MP_Send_extract_proxy ( _Semaphore_MP_Send_process_packet( SEMAPHORE_MP_EXTRACT_PROXY, the_thread->Wait.id, - (Objects_Name) 0, + (rtems_name) 0, the_thread->Object.id ); diff --git a/cpukit/rtems/src/taskmp.c b/cpukit/rtems/src/taskmp.c index b938c60c53..17b08011ef 100644 --- a/cpukit/rtems/src/taskmp.c +++ b/cpukit/rtems/src/taskmp.c @@ -31,7 +31,7 @@ void _RTEMS_tasks_MP_Send_process_packet ( RTEMS_tasks_MP_Remote_operations operation, Objects_Id task_id, - Objects_Name name + rtems_name name ) { RTEMS_tasks_MP_Packet *the_packet; diff --git a/cpukit/rtems/src/tasks.c b/cpukit/rtems/src/tasks.c index e900df0ab8..9cabbc50e9 100644 --- a/cpukit/rtems/src/tasks.c +++ b/cpukit/rtems/src/tasks.c @@ -14,6 +14,7 @@ */ #include <rtems/system.h> +#include <rtems/support.h> #include <rtems/modes.h> #include <rtems/object.h> #include <rtems/stack.h> @@ -48,7 +49,7 @@ */ rtems_status_code rtems_task_create( - Objects_Name name, + rtems_name name, rtems_task_priority initial_priority, unsigned32 stack_size, rtems_mode initial_modes, @@ -62,7 +63,7 @@ rtems_status_code rtems_task_create( void *memory; rtems_attribute the_attribute_set; - if ( !_Objects_Is_name_valid( name ) ) + if ( !rtems_is_name_valid( name ) ) return ( RTEMS_INVALID_NAME ); #if 0 @@ -156,7 +157,7 @@ rtems_status_code rtems_task_create( _ASR_Initialize( &the_thread->Signal ); - _Objects_Open( &_Thread_Information, &the_thread->Object, name ); + _Objects_Open( &_Thread_Information, &the_thread->Object, &name ); *id = the_thread->Object.id; @@ -192,13 +193,13 @@ rtems_status_code rtems_task_create( */ rtems_status_code rtems_task_ident( - Objects_Name name, + rtems_name name, unsigned32 node, Objects_Id *id ) { if ( name != OBJECTS_ID_OF_SELF ) - return( _Objects_Name_to_id( &_Thread_Information, name, node, id ) ); + return( _Objects_Name_to_id( &_Thread_Information, &name, node, id ) ); *id = _Thread_Executing->Object.id; return( RTEMS_SUCCESSFUL ); |