summaryrefslogtreecommitdiffstats
path: root/c/src/exec/rtems/src/dpmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/exec/rtems/src/dpmem.c')
-rw-r--r--c/src/exec/rtems/src/dpmem.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/c/src/exec/rtems/src/dpmem.c b/c/src/exec/rtems/src/dpmem.c
index 9cc778df82..cb9ed3fa4d 100644
--- a/c/src/exec/rtems/src/dpmem.c
+++ b/c/src/exec/rtems/src/dpmem.c
@@ -168,10 +168,12 @@ rtems_status_code rtems_port_delete(
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
- case OBJECTS_ERROR:
- return RTEMS_INVALID_ID;
case OBJECTS_REMOTE: /* this error cannot be returned */
return RTEMS_INTERNAL_ERROR;
+
+ case OBJECTS_ERROR:
+ return RTEMS_INVALID_ID;
+
case OBJECTS_LOCAL:
_Objects_Close( &_Dual_ported_memory_Information, &the_port->Object );
_Dual_ported_memory_Free( the_port );
@@ -213,10 +215,12 @@ 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;
case OBJECTS_REMOTE: /* this error cannot be returned */
return RTEMS_INTERNAL_ERROR;
+
+ case OBJECTS_ERROR:
+ return RTEMS_INVALID_ID;
+
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( internal, the_port->internal_base );
if ( ending > the_port->length )
@@ -262,10 +266,12 @@ 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;
case OBJECTS_REMOTE: /* this error cannot be returned */
return RTEMS_INTERNAL_ERROR;
+
+ case OBJECTS_ERROR:
+ return RTEMS_INVALID_ID;
+
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( external, the_port->external_base );
if ( ending > the_port->length )