diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1995-09-11 19:35:39 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1995-09-11 19:35:39 +0000 |
commit | 3a4ae6c210bcc37754767966f1128ae23c77b6af (patch) | |
tree | 8804983e5b92bec788d548df13db7513118d351d /c/src/exec/rtems/src/dpmem.c | |
parent | new file -- split from inlines (diff) | |
download | rtems-3a4ae6c210bcc37754767966f1128ae23c77b6af.tar.bz2 |
The word "RTEMS" almost completely removed from the core.
Configuration Table Template file added and all tests
modified to use this. All gvar.h and conftbl.h files
removed from test directories.
Configuration parameter maximum_devices added.
Core semaphore and mutex handlers added and RTEMS API Semaphore
Manager updated to reflect this.
Initialization sequence changed to invoke API specific initialization
routines. Initialization tasks table now owned by RTEMS Tasks Manager.
Added user extension for post-switch.
Utilized user extensions to implement API specific functionality
like signal dispatching.
Added extensions to the System Initialization Thread so that an
API can register a function to be invoked while the system
is being initialized. These are largely equivalent to the
pre-driver and post-driver hooks.
Added the Modules file oar-go32_p5, modified oar-go32, and modified
the file make/custom/go32.cfg to look at an environment varable which
determines what CPU model is being used.
All BSPs updated to reflect named devices and clock driver's IOCTL
used by the Shared Memory Driver. Also merged clock isr into
main file and removed ckisr.c where possible.
Updated spsize to reflect new and moved variables.
Makefiles for the executive source and include files updated to show
break down of files into Core, RTEMS API, and Neither.
Header and inline files installed into subdirectory based on whether
logically in the Core or a part of the RTEMS API.
Diffstat (limited to 'c/src/exec/rtems/src/dpmem.c')
-rw-r--r-- | c/src/exec/rtems/src/dpmem.c | 60 |
1 files changed, 32 insertions, 28 deletions
diff --git a/c/src/exec/rtems/src/dpmem.c b/c/src/exec/rtems/src/dpmem.c index 522c14866b..ee41eec142 100644 --- a/c/src/exec/rtems/src/dpmem.c +++ b/c/src/exec/rtems/src/dpmem.c @@ -13,11 +13,13 @@ */ #include <rtems/system.h> -#include <rtems/support.h> -#include <rtems/address.h> -#include <rtems/dpmem.h> -#include <rtems/object.h> -#include <rtems/thread.h> +#include <rtems/rtems/status.h> +#include <rtems/rtems/support.h> +#include <rtems/core/address.h> +#include <rtems/rtems/dpmem.h> +#include <rtems/core/object.h> +#include <rtems/core/thread.h> +#include <rtems/rtems/dpmem.h> /*PAGE * @@ -78,11 +80,11 @@ rtems_status_code rtems_port_create( register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name) ) - return ( RTEMS_INVALID_NAME ); + return RTEMS_INVALID_NAME; if ( !_Addresses_Is_aligned( internal_start ) || !_Addresses_Is_aligned( external_start ) ) - return( RTEMS_INVALID_ADDRESS ); + return RTEMS_INVALID_ADDRESS; _Thread_Disable_dispatch(); /* to prevent deletion */ @@ -90,7 +92,7 @@ rtems_status_code rtems_port_create( if ( !the_port ) { _Thread_Enable_dispatch(); - return( RTEMS_TOO_MANY ); + return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; @@ -105,7 +107,7 @@ rtems_status_code rtems_port_create( *id = the_port->Object.id; _Thread_Enable_dispatch(); - return( RTEMS_SUCCESSFUL ); + return RTEMS_SUCCESSFUL; } /*PAGE @@ -130,14 +132,16 @@ rtems_status_code rtems_port_ident( Objects_Id *id ) { - return( - _Objects_Name_to_id( - &_Dual_ported_memory_Information, - &name, - RTEMS_SEARCH_ALL_NODES, - id - ) + Objects_Name_to_id_errors status; + + status = _Objects_Name_to_id( + &_Dual_ported_memory_Information, + &name, + OBJECTS_SEARCH_ALL_NODES, + id ); + + return _Status_Object_name_errors_to_status[ status ]; } /*PAGE @@ -165,17 +169,17 @@ rtems_status_code rtems_port_delete( the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_ERROR: - return( RTEMS_INVALID_ID ); + return RTEMS_INVALID_ID; case OBJECTS_REMOTE: /* this error cannot be returned */ - return( RTEMS_INTERNAL_ERROR ); + return RTEMS_INTERNAL_ERROR; case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); - return( RTEMS_SUCCESSFUL ); + return RTEMS_SUCCESSFUL; } - return( RTEMS_INTERNAL_ERROR ); /* unreached - only to remove warnings */ + return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } /*PAGE @@ -210,9 +214,9 @@ rtems_status_code rtems_port_internal_to_external( the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_ERROR: - return( RTEMS_INVALID_ID ); + return RTEMS_INVALID_ID; case OBJECTS_REMOTE: /* this error cannot be returned */ - return( RTEMS_INTERNAL_ERROR ); + return RTEMS_INTERNAL_ERROR; case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); if ( ending > the_port->length ) @@ -221,10 +225,10 @@ rtems_status_code rtems_port_internal_to_external( *external = _Addresses_Add_offset( the_port->external_base, ending ); _Thread_Enable_dispatch(); - return( RTEMS_SUCCESSFUL ); + return RTEMS_SUCCESSFUL; } - return( RTEMS_INTERNAL_ERROR ); /* unreached - only to remove warnings */ + return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } /*PAGE @@ -259,9 +263,9 @@ rtems_status_code rtems_port_external_to_internal( the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_ERROR: - return( RTEMS_INVALID_ID ); + return RTEMS_INVALID_ID; case OBJECTS_REMOTE: /* this error cannot be returned */ - return( RTEMS_INTERNAL_ERROR ); + return RTEMS_INTERNAL_ERROR; case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); if ( ending > the_port->length ) @@ -270,8 +274,8 @@ rtems_status_code rtems_port_external_to_internal( *internal = _Addresses_Add_offset( the_port->internal_base, ending ); _Thread_Enable_dispatch(); - return( RTEMS_SUCCESSFUL ); + return RTEMS_SUCCESSFUL; } - return( RTEMS_INTERNAL_ERROR ); /* unreached - only to remove warnings */ + return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } |