[PATCH 03/14] mpci: Delete unused region support
Sebastian Huber
sebastian.huber at embedded-brains.de
Wed May 11 13:23:30 UTC 2016
---
cpukit/rtems/Makefile.am | 2 -
cpukit/rtems/include/rtems/rtems/regionimpl.h | 4 -
cpukit/rtems/include/rtems/rtems/regionmp.h | 140 -------------
cpukit/rtems/preinstall.am | 4 -
cpukit/rtems/src/regionmp.c | 279 --------------------------
5 files changed, 429 deletions(-)
delete mode 100644 cpukit/rtems/include/rtems/rtems/regionmp.h
delete mode 100644 cpukit/rtems/src/regionmp.c
diff --git a/cpukit/rtems/Makefile.am b/cpukit/rtems/Makefile.am
index 73d9e30..368dcdc 100644
--- a/cpukit/rtems/Makefile.am
+++ b/cpukit/rtems/Makefile.am
@@ -60,7 +60,6 @@ include_rtems_rtems_HEADERS += include/rtems/rtems/eventmp.h
include_rtems_rtems_HEADERS += include/rtems/rtems/mp.h
include_rtems_rtems_HEADERS += include/rtems/rtems/msgmp.h
include_rtems_rtems_HEADERS += include/rtems/rtems/partmp.h
-include_rtems_rtems_HEADERS += include/rtems/rtems/regionmp.h
include_rtems_rtems_HEADERS += include/rtems/rtems/semmp.h
include_rtems_rtems_HEADERS += include/rtems/rtems/signalmp.h
include_rtems_rtems_HEADERS += include/rtems/rtems/taskmp.h
@@ -245,7 +244,6 @@ librtems_a_SOURCES += src/eventmp.c
librtems_a_SOURCES += src/mp.c
librtems_a_SOURCES += src/msgmp.c
librtems_a_SOURCES += src/partmp.c
-librtems_a_SOURCES += src/regionmp.c
librtems_a_SOURCES += src/semmp.c
librtems_a_SOURCES += src/signalmp.c
librtems_a_SOURCES += src/taskmp.c
diff --git a/cpukit/rtems/include/rtems/rtems/regionimpl.h b/cpukit/rtems/include/rtems/rtems/regionimpl.h
index e4dcff0..1f31ad4 100644
--- a/cpukit/rtems/include/rtems/rtems/regionimpl.h
+++ b/cpukit/rtems/include/rtems/rtems/regionimpl.h
@@ -135,9 +135,5 @@ extern void _Region_Process_queue(Region_Control *the_region);
}
#endif
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/rtems/regionmp.h>
-#endif
-
#endif
/* end of include file */
diff --git a/cpukit/rtems/include/rtems/rtems/regionmp.h b/cpukit/rtems/include/rtems/rtems/regionmp.h
deleted file mode 100644
index df7f633..0000000
--- a/cpukit/rtems/include/rtems/rtems/regionmp.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- * @file rtems/rtems/regionmp.h
- *
- * @defgroup ClassicRegionMP Region MP Support
- *
- * @ingroup ClassicMP
- * @brief Multiprocessing Support in Region Manager
- *
- * This include file contains all the constants and structures associated
- * with the Multiprocessing Support in the Region Manager.
- */
-
-/* COPYRIGHT (c) 1989-2013.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#ifndef _RTEMS_RTEMS_REGIONMP_H
-#define _RTEMS_RTEMS_REGIONMP_H
-
-#ifndef _RTEMS_RTEMS_REGIONIMPL_H
-# error "Never use <rtems/rtems/regionmp.h> directly; include <rtems/rtems/regionimpl.h> instead."
-#endif
-
-#include <rtems/score/mpciimpl.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @defgroup ClassicRegionMP Region MP Support
- *
- * @ingroup ClassicMP
- *
- * This encapsulates functionality related to the transparent multiprocessing
- * support within the Classic API Region Manager.
- */
-/**@{*/
-
-/**
- * The following enumerated type defines the list of
- * remote region operations.
- */
-typedef enum {
- REGION_MP_ANNOUNCE_CREATE = 0,
- REGION_MP_ANNOUNCE_DELETE = 1,
- REGION_MP_EXTRACT_PROXY = 2,
- REGION_MP_GET_SEGMENT_REQUEST = 3,
- REGION_MP_GET_SEGMENT_RESPONSE = 4,
- REGION_MP_RETURN_SEGMENT_REQUEST = 5,
- REGION_MP_RETURN_SEGMENT_RESPONSE = 6
-} Region_MP_Remote_operations;
-
-/**
- * The following data structure defines the packet used to perform
- * remote region operations.
- */
-typedef struct {
- rtems_packet_prefix Prefix;
- Region_MP_Remote_operations operation;
- rtems_name name;
- rtems_option option_set;
- uint32_t size;
- Objects_Id proxy_id;
- void *segment;
-} Region_MP_Packet;
-
-/**
- * @brief Region MP Send Process Packet
- *
- * This routine performs a remote procedure call so that a
- * process operation can be performed on another node.
- */
-void _Region_MP_Send_process_packet (
- Region_MP_Remote_operations operation,
- Objects_Id region_id,
- rtems_name name,
- Objects_Id proxy_id
-);
-
-/**
- * @brief Region MP Send Request Packet
- *
- * This routine performs a remote procedure call so that a
- * directive operation can be initiated on another node.
- */
-rtems_status_code _Region_MP_Send_request_packet (
- Region_MP_Remote_operations operation,
- Objects_Id region_id,
- void *segment,
- intptr_t size,
- rtems_option option_set,
- rtems_interval timeout
-);
-
-/**
- * @brief Region MP Process Packet
- *
- * This routine performs the actions specific to this package for
- * the request from another node.
- */
-void _Region_MP_Process_packet (
- rtems_packet_prefix *the_packet_prefix
-);
-
-/*
- * @brief _Region_MP_Send_object_was_deleted
- *
- * This routine is invoked indirectly by the thread queue
- * when a proxy has been removed from the thread queue and
- * the remote node must be informed of this.
- *
- * This routine is not needed by the Region since a region
- * cannot be deleted when segments are in use.
- */
-
-/**
- * @brief Region MP Send Extract Proxy
- *
- * This routine is invoked when a task is deleted and it
- * has a proxy which must be removed from a thread queue and
- * the remote node must be informed of this.
- */
-void _Region_MP_Send_extract_proxy (
- Thread_Control *the_thread,
- Objects_Id id
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-/**@}*/
-
-#endif
-/* end of file */
diff --git a/cpukit/rtems/preinstall.am b/cpukit/rtems/preinstall.am
index a676cd9..35e78db 100644
--- a/cpukit/rtems/preinstall.am
+++ b/cpukit/rtems/preinstall.am
@@ -208,10 +208,6 @@ $(PROJECT_INCLUDE)/rtems/rtems/partmp.h: include/rtems/rtems/partmp.h $(PROJECT_
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/partmp.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/partmp.h
-$(PROJECT_INCLUDE)/rtems/rtems/regionmp.h: include/rtems/rtems/regionmp.h $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/regionmp.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/regionmp.h
-
$(PROJECT_INCLUDE)/rtems/rtems/semmp.h: include/rtems/rtems/semmp.h $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/semmp.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/semmp.h
diff --git a/cpukit/rtems/src/regionmp.c b/cpukit/rtems/src/regionmp.c
deleted file mode 100644
index 1bdd283..0000000
--- a/cpukit/rtems/src/regionmp.c
+++ /dev/null
@@ -1,279 +0,0 @@
-/**
- * @file
- *
- * @brief Region MP Support
- * @ingroup ClassicRegionMP
- */
-
-/*
- * COPYRIGHT (c) 1989-2008.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/rtems/regionimpl.h>
-#include <rtems/rtems/optionsimpl.h>
-#include <rtems/score/statesimpl.h>
-#include <rtems/score/threadimpl.h>
-#include <rtems/score/threadqimpl.h>
-
-RTEMS_STATIC_ASSERT(
- sizeof(Region_MP_Packet) <= MP_PACKET_MINIMUM_PACKET_SIZE,
- Region_MP_Packet
-);
-
-static Region_MP_Packet *_Region_MP_Get_packet( void )
-{
- return (Region_MP_Packet *) _MPCI_Get_packet();
-}
-
-void _Region_MP_Send_process_packet (
- Region_MP_Remote_operations operation,
- Objects_Id region_id,
- rtems_name name,
- Objects_Id proxy_id
-)
-{
- Region_MP_Packet *the_packet;
- uint32_t node;
-
- switch ( operation ) {
-
- case REGION_MP_ANNOUNCE_CREATE:
- case REGION_MP_ANNOUNCE_DELETE:
- case REGION_MP_EXTRACT_PROXY:
-
- the_packet = _Region_MP_Get_packet();
- the_packet->Prefix.the_class = MP_PACKET_REGION;
- the_packet->Prefix.length = sizeof ( Region_MP_Packet );
- the_packet->Prefix.to_convert = sizeof ( Region_MP_Packet );
- the_packet->operation = operation;
- the_packet->Prefix.id = region_id;
- the_packet->name = name;
- the_packet->proxy_id = proxy_id;
-
- if ( operation == REGION_MP_EXTRACT_PROXY )
- node = _Objects_Get_node( region_id );
- else
- node = MPCI_ALL_NODES;
-
- _MPCI_Send_process_packet( node, &the_packet->Prefix );
- break;
-
- case REGION_MP_GET_SEGMENT_REQUEST:
- case REGION_MP_GET_SEGMENT_RESPONSE:
- case REGION_MP_RETURN_SEGMENT_REQUEST:
- case REGION_MP_RETURN_SEGMENT_RESPONSE:
- break;
- }
-}
-
-rtems_status_code _Region_MP_Send_request_packet (
- Region_MP_Remote_operations operation,
- Objects_Id region_id,
- void *segment,
- intptr_t size,
- rtems_option option_set,
- rtems_interval timeout
-)
-{
- Region_MP_Packet *the_packet;
-
- switch ( operation ) {
-
- case REGION_MP_GET_SEGMENT_REQUEST:
- case REGION_MP_RETURN_SEGMENT_REQUEST:
-
- the_packet = _Region_MP_Get_packet();
- the_packet->Prefix.the_class = MP_PACKET_REGION;
- the_packet->Prefix.length = sizeof ( Region_MP_Packet );
- the_packet->Prefix.to_convert = sizeof ( Region_MP_Packet );
- if ( ! _Options_Is_no_wait(option_set))
- the_packet->Prefix.timeout = timeout;
-
- the_packet->operation = operation;
- the_packet->Prefix.id = region_id;
- the_packet->segment = segment;
- the_packet->size = size;
- the_packet->option_set = option_set;
-
- return (rtems_status_code) _MPCI_Send_request_packet(
- _Objects_Get_node( region_id ),
- &the_packet->Prefix,
- STATES_READY, /* Not used */
- RTEMS_TIMEOUT
- );
- break;
-
- case REGION_MP_ANNOUNCE_CREATE:
- case REGION_MP_ANNOUNCE_DELETE:
- case REGION_MP_EXTRACT_PROXY:
- case REGION_MP_GET_SEGMENT_RESPONSE:
- case REGION_MP_RETURN_SEGMENT_RESPONSE:
- break;
-
- }
- /*
- * The following line is included to satisfy compilers which
- * produce warnings when a function does not end with a return.
- */
- return RTEMS_INTERNAL_ERROR;
-}
-
-static void _Region_MP_Send_response_packet (
- Region_MP_Remote_operations operation,
- Objects_Id region_id,
- Thread_Control *the_thread
-)
-{
- Region_MP_Packet *the_packet;
-
- switch ( operation ) {
-
- case REGION_MP_GET_SEGMENT_RESPONSE:
- case REGION_MP_RETURN_SEGMENT_RESPONSE:
-
- the_packet = ( Region_MP_Packet *) the_thread->receive_packet;
-
-/*
- * The packet being returned already contains the class, length, and
- * to_convert fields, therefore they are not set in this routine.
- */
- the_packet->operation = operation;
- the_packet->Prefix.id = the_packet->Prefix.source_tid;
-
- _MPCI_Send_response_packet(
- _Objects_Get_node( the_packet->Prefix.source_tid ),
- &the_packet->Prefix
- );
- break;
-
- case REGION_MP_ANNOUNCE_CREATE:
- case REGION_MP_ANNOUNCE_DELETE:
- case REGION_MP_EXTRACT_PROXY:
- case REGION_MP_GET_SEGMENT_REQUEST:
- case REGION_MP_RETURN_SEGMENT_REQUEST:
- break;
-
- }
-}
-
-void _Region_MP_Process_packet (
- rtems_packet_prefix *the_packet_prefix
-)
-{
- Region_MP_Packet *the_packet;
- Thread_Control *the_thread;
-
- the_packet = (Region_MP_Packet *) the_packet_prefix;
-
- switch ( the_packet->operation ) {
-
- case REGION_MP_ANNOUNCE_CREATE:
-
- _Objects_MP_Allocate_and_open(
- &_Region_Information,
- the_packet->name,
- the_packet->Prefix.id,
- true
- );
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- case REGION_MP_ANNOUNCE_DELETE:
-
- _Objects_MP_Close( &_Region_Information, the_packet->Prefix.id );
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- case REGION_MP_EXTRACT_PROXY:
-
- the_thread = _Thread_MP_Find_proxy( the_packet->proxy_id );
-
- if ( ! _Thread_Is_null( the_thread ) )
- _Thread_queue_Extract( the_thread );
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- case REGION_MP_GET_SEGMENT_REQUEST:
-
- the_packet->Prefix.return_code = rtems_region_get_segment(
- the_packet->Prefix.id,
- the_packet->size,
- the_packet->option_set,
- the_packet->Prefix.timeout,
- &the_packet->segment
- );
-
- _Region_MP_Send_response_packet(
- REGION_MP_GET_SEGMENT_RESPONSE,
- the_packet->Prefix.id,
- _Thread_Executing
- );
- break;
-
- case REGION_MP_GET_SEGMENT_RESPONSE:
-
- the_thread = _MPCI_Process_response( the_packet_prefix );
-
- *(void **)the_thread->Wait.return_argument = the_packet->segment;
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- case REGION_MP_RETURN_SEGMENT_REQUEST:
-
- the_packet->Prefix.return_code = rtems_region_return_segment(
- the_packet->Prefix.id,
- the_packet->segment
- );
-
- _Region_MP_Send_response_packet(
- REGION_MP_RETURN_SEGMENT_RESPONSE,
- the_packet->Prefix.id,
- _Thread_Executing
- );
- break;
-
- case REGION_MP_RETURN_SEGMENT_RESPONSE:
-
- the_thread = _MPCI_Process_response( the_packet_prefix );
-
- _MPCI_Return_packet( the_packet_prefix );
- break;
-
- }
-}
-
-/*
- * _Region_MP_Send_object_was_deleted
- *
- * This routine is not needed by the Region since a region
- * cannot be deleted when segments are in use.
- *
- */
-
-void _Region_MP_Send_extract_proxy (
- Thread_Control *the_thread,
- Objects_Id id
-)
-{
- _Region_MP_Send_process_packet(
- REGION_MP_EXTRACT_PROXY,
- id,
- (rtems_name) 0,
- the_thread->Object.id
- );
-}
-
-/* end of file */
--
1.8.4.5
More information about the devel
mailing list