rtems_status_code _Partition_MP_Send_request_packet ( Partition_MP_Remote_operations operation, Objects_Id partition_id, void *buffer ) { Partition_MP_Packet *the_packet; switch ( operation ) { case PARTITION_MP_GET_BUFFER_REQUEST: case PARTITION_MP_RETURN_BUFFER_REQUEST: the_packet = _Partition_MP_Get_packet(); the_packet->Prefix.the_class = MP_PACKET_PARTITION; the_packet->Prefix.length = sizeof ( Partition_MP_Packet ); the_packet->Prefix.to_convert = sizeof ( Partition_MP_Packet ); the_packet->operation = operation; the_packet->Prefix.id = partition_id; the_packet->buffer = buffer; return _MPCI_Send_request_packet( _Objects_Get_node( partition_id ), &the_packet->Prefix, STATES_READY /* Not used */ ); break; case PARTITION_MP_ANNOUNCE_CREATE: case PARTITION_MP_ANNOUNCE_DELETE: case PARTITION_MP_EXTRACT_PROXY: case PARTITION_MP_GET_BUFFER_RESPONSE: case PARTITION_MP_RETURN_BUFFER_RESPONSE: break; } /* * The following line is included to satisfy compilers which * produce warnings when a function does not end with a return. */ return RTEMS_SUCCESSFUL; }
static rtems_status_code _Partition_MP_Send_request_packet ( Objects_Id partition_id, void *buffer, Partition_MP_Remote_operations operation ) { Partition_MP_Packet *the_packet; Status_Control status; if ( !_Partition_MP_Is_remote( partition_id ) ) { return RTEMS_INVALID_ID; } switch ( operation ) { case PARTITION_MP_GET_BUFFER_REQUEST: case PARTITION_MP_RETURN_BUFFER_REQUEST: the_packet = _Partition_MP_Get_packet(); _Partition_MP_Initialize_packet( the_packet, partition_id, operation ); the_packet->buffer = buffer; status = _MPCI_Send_request_packet( _Objects_Get_node( partition_id ), &the_packet->Prefix, STATES_READY /* Not used */ ); return _Status_Get( status ); case PARTITION_MP_ANNOUNCE_CREATE: case PARTITION_MP_ANNOUNCE_DELETE: case PARTITION_MP_EXTRACT_PROXY: case PARTITION_MP_GET_BUFFER_RESPONSE: case PARTITION_MP_RETURN_BUFFER_RESPONSE: break; } /* * The following line is included to satisfy compilers which * produce warnings when a function does not end with a return. */ return RTEMS_SUCCESSFUL; }
void _Partition_MP_Send_process_packet ( Partition_MP_Remote_operations operation, Objects_Id partition_id, rtems_name name, Objects_Id proxy_id ) { Partition_MP_Packet *the_packet; uint32_t node; switch ( operation ) { case PARTITION_MP_ANNOUNCE_CREATE: case PARTITION_MP_ANNOUNCE_DELETE: case PARTITION_MP_EXTRACT_PROXY: the_packet = _Partition_MP_Get_packet(); the_packet->Prefix.the_class = MP_PACKET_PARTITION; the_packet->Prefix.length = sizeof ( Partition_MP_Packet ); the_packet->Prefix.to_convert = sizeof ( Partition_MP_Packet ); the_packet->operation = operation; the_packet->Prefix.id = partition_id; the_packet->name = name; the_packet->proxy_id = proxy_id; if ( operation == PARTITION_MP_EXTRACT_PROXY ) node = _Objects_Get_node( partition_id ); else node = MPCI_ALL_NODES; _MPCI_Send_process_packet( node, &the_packet->Prefix ); break; case PARTITION_MP_GET_BUFFER_REQUEST: case PARTITION_MP_GET_BUFFER_RESPONSE: case PARTITION_MP_RETURN_BUFFER_REQUEST: case PARTITION_MP_RETURN_BUFFER_RESPONSE: break; } }