[4b487363] | 1 | /** |
---|
| 2 | * @file rtems/rtems/partmp.h |
---|
[067a96a] | 3 | * |
---|
[61b8e9f] | 4 | * @brief MP Support in Partition Manager |
---|
| 5 | * |
---|
| 6 | * This include file contains all the constants and structures associated |
---|
| 7 | * with the Multiprocessing Support in the Partition Manager. |
---|
[067a96a] | 8 | */ |
---|
| 9 | |
---|
[651e3aa] | 10 | /* COPYRIGHT (c) 1989-2013. |
---|
[61b8e9f] | 11 | * On-Line Applications Research Corporation (OAR). |
---|
[ac7d5ef0] | 12 | * |
---|
[61b8e9f] | 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_RTEMS_PARTMP_H |
---|
| 19 | #define _RTEMS_RTEMS_PARTMP_H |
---|
[ac7d5ef0] | 20 | |
---|
[8695cae] | 21 | #ifndef _RTEMS_RTEMS_PARTIMPL_H |
---|
| 22 | # error "Never use <rtems/rtems/partmp.h> directly; include <rtems/rtems/partimpl.h> instead." |
---|
[ac7d5ef0] | 23 | #endif |
---|
| 24 | |
---|
[7f04cb18] | 25 | #include <rtems/score/mpciimpl.h> |
---|
[3a4ae6c] | 26 | |
---|
[8695cae] | 27 | #ifdef __cplusplus |
---|
| 28 | extern "C" { |
---|
| 29 | #endif |
---|
[ac7d5ef0] | 30 | |
---|
[067a96a] | 31 | /** |
---|
[c85ab23] | 32 | * @defgroup ClassicPartMP Partition MP Support |
---|
| 33 | * |
---|
| 34 | * @ingroup ClassicMP |
---|
[067a96a] | 35 | * |
---|
[651e3aa] | 36 | * This encapsulates functionality related to the transparent multiprocessing |
---|
| 37 | * support within the Classic API Partition Manager. |
---|
[067a96a] | 38 | */ |
---|
[a15eaaf] | 39 | /*{*/ |
---|
[067a96a] | 40 | |
---|
| 41 | /** |
---|
[ac7d5ef0] | 42 | * The following enumerated type defines the list of |
---|
| 43 | * remote partition operations. |
---|
| 44 | */ |
---|
| 45 | typedef enum { |
---|
| 46 | PARTITION_MP_ANNOUNCE_CREATE = 0, |
---|
| 47 | PARTITION_MP_ANNOUNCE_DELETE = 1, |
---|
| 48 | PARTITION_MP_EXTRACT_PROXY = 2, |
---|
| 49 | PARTITION_MP_GET_BUFFER_REQUEST = 3, |
---|
| 50 | PARTITION_MP_GET_BUFFER_RESPONSE = 4, |
---|
| 51 | PARTITION_MP_RETURN_BUFFER_REQUEST = 5, |
---|
[45819022] | 52 | PARTITION_MP_RETURN_BUFFER_RESPONSE = 6 |
---|
[ac7d5ef0] | 53 | } Partition_MP_Remote_operations; |
---|
| 54 | |
---|
[067a96a] | 55 | /** |
---|
[ac7d5ef0] | 56 | * The following data structure defines the packet used to perform |
---|
| 57 | * remote partition operations. |
---|
| 58 | */ |
---|
| 59 | typedef struct { |
---|
[3235ad9] | 60 | rtems_packet_prefix Prefix; |
---|
[ac7d5ef0] | 61 | Partition_MP_Remote_operations operation; |
---|
[3235ad9] | 62 | rtems_name name; |
---|
[ac7d5ef0] | 63 | void *buffer; |
---|
| 64 | Objects_Id proxy_id; |
---|
| 65 | } Partition_MP_Packet; |
---|
| 66 | |
---|
[0a00b2b] | 67 | RTEMS_INLINE_ROUTINE bool _Partition_MP_Is_remote( Objects_Id id ) |
---|
| 68 | { |
---|
| 69 | return _Objects_MP_Is_remote( id, &_Partition_Information ); |
---|
| 70 | } |
---|
| 71 | |
---|
[067a96a] | 72 | /** |
---|
| 73 | * @brief Partition_MP_Send_process_packet |
---|
[ac7d5ef0] | 74 | * |
---|
[4efe1955] | 75 | * Multiprocessing Support for the Partition Manager |
---|
| 76 | * |
---|
[ac7d5ef0] | 77 | * This routine performs a remote procedure call so that a |
---|
| 78 | * process operation can be performed on another node. |
---|
| 79 | */ |
---|
| 80 | void _Partition_MP_Send_process_packet ( |
---|
| 81 | Partition_MP_Remote_operations operation, |
---|
| 82 | Objects_Id partition_id, |
---|
[3235ad9] | 83 | rtems_name name, |
---|
[ac7d5ef0] | 84 | Objects_Id proxy_id |
---|
| 85 | ); |
---|
| 86 | |
---|
[067a96a] | 87 | /** |
---|
[0a00b2b] | 88 | * @brief Issues a remote rtems_partition_get_buffer() request. |
---|
| 89 | */ |
---|
| 90 | rtems_status_code _Partition_MP_Get_buffer( |
---|
| 91 | rtems_id id, |
---|
| 92 | void **buffer |
---|
| 93 | ); |
---|
| 94 | |
---|
| 95 | /** |
---|
| 96 | * @brief Issues a remote rtems_partition_return_buffer() request. |
---|
[ac7d5ef0] | 97 | */ |
---|
[0a00b2b] | 98 | rtems_status_code _Partition_MP_Return_buffer( |
---|
| 99 | rtems_id id, |
---|
| 100 | void *buffer |
---|
[ac7d5ef0] | 101 | ); |
---|
| 102 | |
---|
[067a96a] | 103 | /** |
---|
[ac7d5ef0] | 104 | * |
---|
[067a96a] | 105 | * @brief Partition_MP_Process_packet |
---|
[ac7d5ef0] | 106 | * |
---|
| 107 | * This routine performs the actions specific to this package for |
---|
| 108 | * the request from another node. |
---|
| 109 | */ |
---|
| 110 | void _Partition_MP_Process_packet ( |
---|
| 111 | rtems_packet_prefix *the_packet_prefix |
---|
| 112 | ); |
---|
| 113 | |
---|
[98e92b0a] | 114 | /* |
---|
[067a96a] | 115 | * @brief Partition_MP_Send_object_was_deleted |
---|
[ac7d5ef0] | 116 | * |
---|
| 117 | * This routine is invoked indirectly by the thread queue |
---|
| 118 | * when a proxy has been removed from the thread queue and |
---|
| 119 | * the remote node must be informed of this. |
---|
| 120 | * |
---|
| 121 | * This routine is not needed by the Partition since a partition |
---|
| 122 | * cannot be deleted when buffers are in use. |
---|
| 123 | */ |
---|
| 124 | |
---|
| 125 | #ifdef __cplusplus |
---|
| 126 | } |
---|
| 127 | #endif |
---|
| 128 | |
---|
[067a96a] | 129 | /**@}*/ |
---|
| 130 | |
---|
[ac7d5ef0] | 131 | #endif |
---|
| 132 | /* end of file */ |
---|