[20f02c6] | 1 | /** |
---|
[7f04cb18] | 2 | * @file |
---|
[ac7d5ef0] | 3 | * |
---|
[4c20da4b] | 4 | * @ingroup RTEMSScoreMPCI |
---|
[1dbbc0c] | 5 | * |
---|
[7f04cb18] | 6 | * @brief MPCI Layer API |
---|
[baff4da] | 7 | */ |
---|
| 8 | |
---|
| 9 | /* |
---|
[4b72da4] | 10 | * COPYRIGHT (c) 1989-2009. |
---|
[ac7d5ef0] | 11 | * On-Line Applications Research Corporation (OAR). |
---|
| 12 | * |
---|
[98e4ebf5] | 13 | * The license and distribution terms for this file may be |
---|
| 14 | * found in the file LICENSE in this distribution or at |
---|
[c499856] | 15 | * http://www.rtems.org/license/LICENSE. |
---|
[ac7d5ef0] | 16 | */ |
---|
| 17 | |
---|
[092f142a] | 18 | #ifndef _RTEMS_SCORE_MPCI_H |
---|
| 19 | #define _RTEMS_SCORE_MPCI_H |
---|
[ac7d5ef0] | 20 | |
---|
[7f04cb18] | 21 | #include <rtems/score/mppkt.h> |
---|
| 22 | #include <rtems/score/thread.h> |
---|
| 23 | #include <rtems/score/threadq.h> |
---|
| 24 | #include <rtems/score/watchdog.h> |
---|
| 25 | |
---|
| 26 | #ifdef __cplusplus |
---|
| 27 | extern "C" { |
---|
| 28 | #endif |
---|
| 29 | |
---|
[baff4da] | 30 | /** |
---|
[4c20da4b] | 31 | * @defgroup RTEMSScoreMPCI MPCI Handler |
---|
[baff4da] | 32 | * |
---|
[4c20da4b] | 33 | * @ingroup RTEMSScore |
---|
[d8cd045c] | 34 | * |
---|
[6a07436] | 35 | * The MPCI Handler encapsulates functionality which is related to the |
---|
[20f02c6] | 36 | * generation, receipt, and processing of remote operations in a |
---|
[6a07436] | 37 | * multiprocessor system. This handler contains the message passing |
---|
| 38 | * support for making remote service calls as well as the server thread |
---|
| 39 | * which processes requests from remote nodes. |
---|
| 40 | */ |
---|
[baff4da] | 41 | /**@{*/ |
---|
| 42 | |
---|
[6a07436] | 43 | /** |
---|
[ac7d5ef0] | 44 | * The following defines the node number used when a broadcast is desired. |
---|
| 45 | */ |
---|
| 46 | #define MPCI_ALL_NODES 0 |
---|
| 47 | |
---|
[baff4da] | 48 | /** |
---|
| 49 | * This type is returned by all user provided MPCI routines. |
---|
| 50 | */ |
---|
[3a4ae6c] | 51 | typedef void MPCI_Entry; |
---|
| 52 | |
---|
[baff4da] | 53 | /** |
---|
[6a07436] | 54 | * This type defines the prototype for the initization entry point |
---|
| 55 | * in an Multiprocessor Communications Interface. |
---|
[baff4da] | 56 | */ |
---|
[3a4ae6c] | 57 | typedef MPCI_Entry ( *MPCI_initialization_entry )( void ); |
---|
| 58 | |
---|
[baff4da] | 59 | /** |
---|
[6a07436] | 60 | * This type defines the prototype for the get packet entry point |
---|
[20f02c6] | 61 | * in an Multiprocessor Communications Interface. The single |
---|
[6a07436] | 62 | * parameter will point to the packet allocated. |
---|
[baff4da] | 63 | */ |
---|
[3a4ae6c] | 64 | typedef MPCI_Entry ( *MPCI_get_packet_entry )( |
---|
[6a07436] | 65 | MP_packet_Prefix ** |
---|
| 66 | ); |
---|
[3a4ae6c] | 67 | |
---|
[baff4da] | 68 | /** |
---|
[6a07436] | 69 | * This type defines the prototype for the return packet entry point |
---|
[20f02c6] | 70 | * in an Multiprocessor Communications Interface. The single |
---|
[6a07436] | 71 | * parameter will point to a packet previously allocated by the |
---|
| 72 | * get packet MPCI entry. |
---|
[baff4da] | 73 | */ |
---|
[3a4ae6c] | 74 | typedef MPCI_Entry ( *MPCI_return_packet_entry )( |
---|
[6a07436] | 75 | MP_packet_Prefix * |
---|
| 76 | ); |
---|
[3a4ae6c] | 77 | |
---|
[baff4da] | 78 | /** |
---|
[6a07436] | 79 | * This type defines the prototype for send get packet entry point |
---|
[20f02c6] | 80 | * in an Multiprocessor Communications Interface. The single |
---|
[6a07436] | 81 | * parameter will point to a packet previously allocated by the |
---|
| 82 | * get packet entry point that has been filled in by the caller. |
---|
[baff4da] | 83 | */ |
---|
[3a4ae6c] | 84 | typedef MPCI_Entry ( *MPCI_send_entry )( |
---|
[6a07436] | 85 | uint32_t, |
---|
| 86 | MP_packet_Prefix * |
---|
| 87 | ); |
---|
[3a4ae6c] | 88 | |
---|
[baff4da] | 89 | /** |
---|
[6a07436] | 90 | * This type defines the prototype for the receive packet entry point |
---|
[20f02c6] | 91 | * in an Multiprocessor Communications Interface. The single |
---|
[6a07436] | 92 | * parameter will point to a packet allocated and filled in by the |
---|
| 93 | * receive packet handler. The caller will block until a packet is |
---|
| 94 | * received. |
---|
[baff4da] | 95 | */ |
---|
[3a4ae6c] | 96 | typedef MPCI_Entry ( *MPCI_receive_entry )( |
---|
[6a07436] | 97 | MP_packet_Prefix ** |
---|
| 98 | ); |
---|
[3a4ae6c] | 99 | |
---|
[baff4da] | 100 | /** |
---|
[6a07436] | 101 | * This type defines the Multiprocessor Communications |
---|
| 102 | * Interface (MPCI) Table. This table defines the user-provided |
---|
| 103 | * MPCI which is a required part of a multiprocessor system. |
---|
| 104 | * |
---|
| 105 | * For non-blocking local operations that become remote operations, |
---|
| 106 | * we need a timeout. This is a per-driver timeout: default_timeout |
---|
[baff4da] | 107 | */ |
---|
[3a4ae6c] | 108 | typedef struct { |
---|
[6a07436] | 109 | /** This fields contains the timeout for MPCI operations in ticks. */ |
---|
[baff4da] | 110 | uint32_t default_timeout; |
---|
[6a07436] | 111 | /** This field contains the maximum size of a packet supported by this |
---|
[20f02c6] | 112 | * MPCI layer. This size places a limit on the size of a message |
---|
[6a07436] | 113 | * which can be transmitted over this interface. |
---|
| 114 | **/ |
---|
[f773c012] | 115 | size_t maximum_packet_size; |
---|
[6a07436] | 116 | /** This field points to the MPCI initialization entry point. */ |
---|
[3a4ae6c] | 117 | MPCI_initialization_entry initialization; |
---|
[6a07436] | 118 | /** This field points to the MPCI get packet entry point. */ |
---|
[3a4ae6c] | 119 | MPCI_get_packet_entry get_packet; |
---|
[6a07436] | 120 | /** This field points to the MPCI return packet entry point. */ |
---|
[3a4ae6c] | 121 | MPCI_return_packet_entry return_packet; |
---|
[6a07436] | 122 | /** This field points to the MPCI send packet entry point. */ |
---|
[3a4ae6c] | 123 | MPCI_send_entry send_packet; |
---|
[6a07436] | 124 | /** This field points to the MPCI receive packet entry point. */ |
---|
[3a4ae6c] | 125 | MPCI_receive_entry receive_packet; |
---|
| 126 | } MPCI_Control; |
---|
| 127 | |
---|
[7f04cb18] | 128 | /**@}*/ |
---|
[adf98bd] | 129 | |
---|
[ac7d5ef0] | 130 | #ifdef __cplusplus |
---|
| 131 | } |
---|
| 132 | #endif |
---|
| 133 | |
---|
| 134 | #endif |
---|
[b10825c] | 135 | /* end of include file */ |
---|