RTEMS 6.1-rc4
|
This group contains the MPCI Handler implementation. More...
Files | |
file | mpci.h |
This header file provides interfaces of the MPCI Handler which are used by the implementation and the Application Configuration. | |
file | mpciimpl.h |
This header file provides interfaces of the MPCI Handler which are only used by the implementation. | |
file | mpci.c |
This source file contains the definition of _System_state_Is_multiprocessing, _MPCI_Semaphore, _MPCI_Remote_blocked_threads, _MPCI_table, _MPCI_Receive_server_tcb, _MPCI_Packet_processors and the implementation of _MPCI_Register_packet_processor(), _MPCI_Get_packet(), _MPCI_Send_process_packet(), _MPCI_Send_request_packet(), _MPCI_Send_response_packet(), _MPCI_Receive_packet(), _MPCI_Process_response(), _MPCI_Receive_server(), _MPCI_Announce(), _MPCI_Internal_packets_Send_process_packet(), _MPCI_Internal_packets_Process_packet(), _MPCI_Internal_packets_Get_packet(), and the MPCI Handler system initialization. | |
file | mpcidefault.c |
This source file contains a definition of _Objects_MP_Controls, _Thread_MP_Proxies, and _MPCI_Receive_server_stack for an application configuration with only the local MPCI node and no MP objects. | |
Data Structures | |
struct | MPCI_Control |
struct | MPCI_Configuration |
struct | MPCI_Internal_packet |
Macros | |
#define | MPCI_ALL_NODES 0 |
#define | MPCI_DEFAULT_TIMEOUT 0xFFFFFFFF |
Typedefs | |
typedef void | MPCI_Entry |
typedef MPCI_Entry(* | MPCI_initialization_entry) (void) |
typedef MPCI_Entry(* | MPCI_get_packet_entry) (MP_packet_Prefix **) |
typedef MPCI_Entry(* | MPCI_return_packet_entry) (MP_packet_Prefix *) |
typedef MPCI_Entry(* | MPCI_send_entry) (uint32_t, MP_packet_Prefix *) |
typedef MPCI_Entry(* | MPCI_receive_entry) (MP_packet_Prefix **) |
typedef void(* | MPCI_Packet_processor) (MP_packet_Prefix *) |
Enumerations | |
enum | MPCI_Internal_Remote_operations { MPCI_PACKETS_SYSTEM_VERIFY = 0 } |
Functions | |
void | _MPCI_Register_packet_processor (MP_packet_Classes the_class, MPCI_Packet_processor the_packet_processor) |
Registers the MPCI packet processor for the designated object class. | |
MP_packet_Prefix * | _MPCI_Get_packet (void) |
Obtains a packet by invoking the user provided MPCI get packet callout. | |
void | _MPCI_Return_packet (MP_packet_Prefix *the_packet) |
Deallocates a packet. | |
void | _MPCI_Send_process_packet (uint32_t destination, MP_packet_Prefix *the_packet) |
Sends a process packet. | |
Status_Control | _MPCI_Send_request_packet (uint32_t destination, MP_packet_Prefix *the_packet, States_Control extra_state) |
Sends a request packet. | |
void | _MPCI_Send_response_packet (uint32_t destination, MP_packet_Prefix *the_packet) |
Sends a response packet. | |
MP_packet_Prefix * | _MPCI_Receive_packet (void) |
Receives a packet. | |
Thread_Control * | _MPCI_Process_response (MP_packet_Prefix *the_packet) |
Passes a packet to the thread. | |
void | _MPCI_Receive_server (Thread_Entry_numeric_type ignored) |
Receives and processes all packets. | |
void | _MPCI_Announce (void) |
Announces the availability of a packet. | |
void | _MPCI_Internal_packets_Send_process_packet (MPCI_Internal_Remote_operations operation) |
Performs a process on another node. | |
void | _MPCI_Internal_packets_Process_packet (MP_packet_Prefix *the_packet_prefix) |
Performs requested action from another node. | |
MPCI_Internal_packet * | _MPCI_Internal_packets_Get_packet (void) |
Obtains an internal thread. | |
Variables | |
const MPCI_Configuration | _MPCI_Configuration |
The MPCI configuration. | |
char | _MPCI_Receive_server_stack [] |
The MPCI receive server stack. | |
Thread_queue_Control | _MPCI_Remote_blocked_threads |
MPCI_Control * | _MPCI_table |
Thread_Control * | _MPCI_Receive_server_tcb |
Pointer to MP thread control block. | |
MPCI_Packet_processor | _MPCI_Packet_processors [MP_PACKET_CLASSES_LAST+1] |
This group contains the MPCI Handler implementation.
The MPCI Handler encapsulates functionality which is related to the generation, receipt, and processing of remote operations in a multiprocessor system. This handler contains the message passing support for making remote service calls as well as the server thread which processes requests from remote nodes.
#define MPCI_ALL_NODES 0 |
The following defines the node number used when a broadcast is desired.
#define MPCI_DEFAULT_TIMEOUT 0xFFFFFFFF |
For packets associated with requests that don't already have a timeout, use the one specified by this MPCI driver. The value specified by the MPCI driver sets an upper limit on how long a remote request should take to complete.
typedef void MPCI_Entry |
This type is returned by all user provided MPCI routines.
typedef MPCI_Entry(* MPCI_get_packet_entry) (MP_packet_Prefix **) |
This type defines the prototype for the get packet entry point in an Multiprocessor Communications Interface. The single parameter will point to the packet allocated.
typedef MPCI_Entry(* MPCI_initialization_entry) (void) |
This type defines the prototype for the initization entry point in an Multiprocessor Communications Interface.
typedef void(* MPCI_Packet_processor) (MP_packet_Prefix *) |
The following defines the type for packet processing routines invoked by the MPCI Receive server.
typedef MPCI_Entry(* MPCI_receive_entry) (MP_packet_Prefix **) |
This type defines the prototype for the receive packet entry point in an Multiprocessor Communications Interface. The single parameter will point to a packet allocated and filled in by the receive packet handler. The caller will block until a packet is received.
typedef MPCI_Entry(* MPCI_return_packet_entry) (MP_packet_Prefix *) |
This type defines the prototype for the return packet entry point in an Multiprocessor Communications Interface. The single parameter will point to a packet previously allocated by the get packet MPCI entry.
typedef MPCI_Entry(* MPCI_send_entry) (uint32_t, MP_packet_Prefix *) |
This type defines the prototype for send get packet entry point in an Multiprocessor Communications Interface. The single parameter will point to a packet previously allocated by the get packet entry point that has been filled in by the caller.
The following enumerated type defines the list of internal MP operations.
void _MPCI_Announce | ( | void | ) |
Announces the availability of a packet.
This routine informs RTEMS of the availability of an MPCI packet.
MP_packet_Prefix * _MPCI_Get_packet | ( | void | ) |
Obtains a packet by invoking the user provided MPCI get packet callout.
MPCI_Internal_packet * _MPCI_Internal_packets_Get_packet | ( | void | ) |
Obtains an internal thread.
_MPCI_Internal_packets_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 since there are no objects deleted by this manager. _MPCI_Internal_packets_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.
This routine is not needed since there are no objects deleted by this manager.
This routine is used to obtain an internal threads MP packet.
pointer | The pointer to the obtained packet. |
NULL | Something went wrong. |
void _MPCI_Internal_packets_Process_packet | ( | MP_packet_Prefix * | the_packet_prefix | ) |
Performs requested action from another node.
_MPCI_Internal_packets_Send_request_packet
This routine performs a remote procedure call so that a directive operation can be initiated on another node.
This routine is not needed since there are no request packets to be sent by this manager. _MPCI_Internal_packets_Send_response_packet
This routine performs a remote procedure call so that a directive can be performed on another node.
This routine is not needed since there are no response packets to be sent by this manager.
This routine performs the actions specific to this package for the request from another node.
the_packet_prefix | The packet prefix for this method. |
void _MPCI_Internal_packets_Send_process_packet | ( | MPCI_Internal_Remote_operations | operation | ) |
Performs a process on another node.
This routine performs a remote procedure call so that a process operation can be performed on another node.
operation | The remote operation to perform. |
Thread_Control * _MPCI_Process_response | ( | MP_packet_Prefix * | the_packet | ) |
Passes a packet to the thread.
This routine is responsible for passing the_packet to the thread waiting on the remote operation to complete. The unblocked thread is responsible for eventually freeing the_packet.
the_packet | is the response packet to be processed. |
pointer | This method returns a pointer to the thread which was unblocked |
NULL | The waiting thread no longer exists. |
MP_packet_Prefix * _MPCI_Receive_packet | ( | void | ) |
Receives a packet.
This routine receives a packet by invoking the user provided MPCI receive callout.
void _MPCI_Receive_server | ( | Thread_Entry_numeric_type | ignored | ) |
Receives and processes all packets.
This is the server thread which receives and processes all MCPI packets.
ignored | The thread argument. It is not used. |
void _MPCI_Register_packet_processor | ( | MP_packet_Classes | the_class, |
MPCI_Packet_processor | the_packet_processor | ||
) |
Registers the MPCI packet processor for the designated object class.
the_class | The class indicator for packets which will be processed by the_packet_processor method. |
the_packet_processor | Pointer to a method which is invoked when packets with the_class are received. |
void _MPCI_Return_packet | ( | MP_packet_Prefix * | the_packet | ) |
Deallocates a packet.
This routine deallocates a packet by invoking the user provided MPCI return packet callout.
[out] | the_packet | The MP packet to deallocate. |
void _MPCI_Send_process_packet | ( | uint32_t | destination, |
MP_packet_Prefix * | the_packet | ||
) |
Sends a process packet.
This routine sends a process packet by invoking the user provided MPCI send callout.
destination | The node which should receive this packet. |
the_packet | The packet to be sent. |
Status_Control _MPCI_Send_request_packet | ( | uint32_t | destination, |
MP_packet_Prefix * | the_packet, | ||
States_Control | extra_state | ||
) |
Sends a request packet.
This routine sends a request packet by invoking the user provided MPCI send callout.
destination | The node which should receive this packet. |
the_packet | The packet to be sent. |
extra_state | The extra thread state bits which should be set in addition to the remote operation pending state. It may indicate the caller is blocking on a message queue operation. |
@ret This method returns the operation status from the remote node.
void _MPCI_Send_response_packet | ( | uint32_t | destination, |
MP_packet_Prefix * | the_packet | ||
) |
Sends a response packet.
This routine sends a response packet by invoking the user provided MPCI send callout.
destination | The node which should receive this packet. |
the_packet | The packet to be sent. |
|
extern |
The MPCI configuration.
Provided by the application via <rtems/confdefs.h>.
|
extern |
The following table contains the process packet routines provided by each object that supports MP operations.
|
extern |
The MPCI receive server stack.
Provided by the application via <rtems/confdefs.h>
|
extern |
Pointer to MP thread control block.
The following is used to determine when the multiprocessing receive thread is executing so that a proxy can be allocated instead of blocking the multiprocessing receive thread.
|
extern |
The following thread queue is used to maintain a list of tasks which currently have outstanding remote requests.
|
extern |
The following define the internal pointers to the user's configuration information.