Commit de01656b authored by yoogx's avatar yoogx

* Suppress a few warnings

	For openaadl/ocarina#160
parent e47f488f
......@@ -5,7 +5,7 @@
*
* For more informations, please visit http://taste.tuxfamily.org/wiki
*
* Copyright (C) 2010-2016 ESA & ISAE.
* Copyright (C) 2010-2018 ESA & ISAE.
*/
......@@ -305,16 +305,16 @@ int __po_hi_initialize ()
#include <po_hi_types.h>
#include <po_hi_transport.h>
#include <a653.h>
#include <air.h>
#include <a653.h>
#include <imaspex.h>
__po_hi_port_kind_t pkind;
__po_hi_port_t tmp;
__po_hi_node_t tmpnode;
__po_hi_node_t mynode;
int portno;
int rc;
long int portno;
RETURN_CODE_TYPE rc;
SYSTEM_TIME_TYPE PERIOD = 1000000;
PARTITION_ID_TYPE self_id;
......@@ -327,7 +327,7 @@ int __po_hi_initialize ()
printf("GET_PARTITION_ID error %d\n", rc);
}
printf("Initializing partition %d...\n", self_id);
__DEBUGMSG("Initializing partition %ld...\n", self_id);
mynode = __po_hi_transport_get_mynode ();
......@@ -359,9 +359,8 @@ int __po_hi_initialize ()
&rc);
if (rc != NO_ERROR) {
__DEBUGMSG("=>>> CREATE_SAMPLING_PORT error %d %d %d %d\n",
rc, INVALID_MODE, INVALID_CONFIG,
__po_hi_transport_get_queue_size (tmp));
__PO_HI_DEBUG_CRITICAL
("CREATE_SAMPLING_PORT error %d\n", rc);
}
break;
......@@ -375,7 +374,7 @@ int __po_hi_initialize ()
&rc);
if (rc != NO_ERROR) {
__DEBUGMSG("CREATE_SAMPLING_PORT error %d\n", rc);
__PO_HI_DEBUG_CRITICAL("CREATE_SAMPLING_PORT error %d\n", rc);
}
break;
......@@ -390,7 +389,7 @@ int __po_hi_initialize ()
&rc);
if (rc != NO_ERROR) {
__DEBUGMSG("CREATE_QUEUING_PORT error %d\n", rc);
__PO_HI_DEBUG_CRITICAL("CREATE_QUEUING_PORT error %d\n", rc);
}
break;
......@@ -405,21 +404,23 @@ int __po_hi_initialize ()
&rc);
if (rc != NO_ERROR) {
__DEBUGMSG("CREATE_QUEUING_PORT error %d\n", rc);
__PO_HI_DEBUG_CRITICAL("CREATE_QUEUING_PORT error %d\n", rc);
}
break;
default:
__DEBUGMSG ("[MAIN] Port kind not handled for port %d\n", tmp);
__PO_HI_DEBUG_CRITICAL
("[MAIN] Port kind not handled for port %d\n", tmp);
break;
}
if (portno < 0) {
__DEBUGMSG ("[MAIN] Cannot open port %d, name=%s, return=%d\n",
tmp, __po_hi_transport_get_model_name (tmp), portno);
__PO_HI_DEBUG_CRITICAL
("[MAIN] Cannot open port %d, name=%s, return=%ld\n",
tmp, __po_hi_transport_get_model_name (tmp), portno);
} else {
__po_hi_transport_xtratum_port_init (tmp, portno);
__DEBUGMSG ("[MAIN] Port %d (name=%s) created, identifier = %d\n",
__po_hi_transport_air_port_init (tmp, portno);
__DEBUGMSG ("[MAIN] Port %d (name=%s) created, identifier = %ld\n",
tmp, __po_hi_transport_get_model_name (tmp), portno);
}
}
......
......@@ -58,25 +58,27 @@ extern __po_hi_bus_id* __po_hi_devices_accessed_buses[__PO_HI
extern __po_hi_protocol_t __po_hi_ports_protocols[__PO_HI_NB_PORTS][__PO_HI_NB_PORTS];
#endif
#if defined(XM3_RTEMS_MODE) || defined(AIR_HYPERVISOR)
#if defined(AIR_HYPERVISOR)
#include <air.h>
#include <a653.h>
#include <deployment.h>
#include <po_hi_types.h>
#include <po_hi_transport.h>
#if defined(AIR_HYPERVISOR)
#include <air.h>
#include <a653.h>
long int __po_hi_air_port[__PO_HI_NB_PORTS];
/* Store either SAMPLING_PORT_ID_TYPE or QUEUING_PORT_ID_TYPE */
#endif
#ifdef XM3_RTEMS_MODE
#include <xm.h>
#endif
int __po_hi_xtratum_port[__PO_HI_NB_PORTS];
#endif
#include <deployment.h>
#include <po_hi_types.h>
#include <po_hi_transport.h>
int __po_hi_xtratum_port[__PO_HI_NB_PORTS];
#endif
int __po_hi_transport_send (__po_hi_task_id id, __po_hi_port_t port)
{
......@@ -177,22 +179,23 @@ int __po_hi_transport_send (__po_hi_task_id id, __po_hi_port_t port)
#elif defined (AIR_HYPERVISOR) /* for AIR */
else {
__po_hi_port_kind_t pkind = __po_hi_transport_get_port_kind (port);
int ret = -1;
RETURN_CODE_TYPE ret;
if (pkind == __PO_HI_OUT_DATA_INTER_PROCESS) {
WRITE_SAMPLING_MESSAGE
(__po_hi_xtratum_port[port],
(__po_hi_air_port[port],
request, sizeof (__po_hi_request_t),
&ret);
}
if (pkind == __PO_HI_OUT_EVENT_DATA_INTER_PROCESS) {
SEND_QUEUING_MESSAGE
(__po_hi_xtratum_port[port],
(__po_hi_air_port[port],
request, sizeof (__po_hi_request_t),
INFINITE_TIME_VALUE, &ret);
}
if (ret != 0) {
if (ret != NO_ERROR) {
__PO_HI_DEBUG_CRITICAL
("[GQUEUE] Error delivering using inter-partitions ports, %d\n",
ret);
......@@ -541,7 +544,7 @@ __po_hi_protocol_conf_t* __po_hi_transport_get_protocol_configuration (const
#endif
}
#if defined(XM3_RTEMS_MODE) || defined(AIR_HYPERVISOR)
#if defined(XM3_RTEMS_MODE)
void __po_hi_transport_xtratum_port_init (const __po_hi_port_t portno, int val)
{
__po_hi_xtratum_port[portno] = val;
......@@ -552,3 +555,15 @@ int __po_hi_transport_xtratum_get_port (const __po_hi_port_t portno)
return __po_hi_xtratum_port[portno];
}
#endif
#if defined(AIR_HYPERVISOR)
void __po_hi_transport_air_port_init (const __po_hi_port_t portno, long int val)
{
__po_hi_air_port[portno] = val;
}
long int __po_hi_transport_air_get_port (const __po_hi_port_t portno)
{
return __po_hi_air_port[portno];
}
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment