Commit fb2aef32 authored by julien.delange's avatar julien.delange
Browse files

* refactor sockets and main in order to handle new macros



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@519 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 3d556d2d
......@@ -18,11 +18,8 @@ extern __po_hi_node_t mynode;
extern __po_hi_inetport_t node_port[__PO_HI_NB_NODES];
extern __po_hi_inetaddr_t node_addr[__PO_HI_NB_NODES];
#define __PO_HI_DRIVER_SOCKET 1
/* To be removed in a near future */
#define __PO_HI_TRANSPORT_SOCKET_NEED_RECEIVER_TASK() \
((__PO_HI_DRIVER_SOCKET == 1) && (__PO_HI_NB_NODES > 1) && (node_port[mynode] != __PO_HI_NOPORT))
(node_port[mynode] != __PO_HI_NOPORT)
/*
* Maccro that declare if we need to activate another thread
* that receives data from a socket (receiver task)
......
......@@ -45,11 +45,13 @@ int __po_hi_initialize ()
*/
nb_tasks_to_init = __PO_HI_NB_TASKS + 1;
#ifdef __PO_HI_NEED_DRIVER_SOCKETS
#if __PO_HI_NB_PORTS > 1
if (__PO_HI_TRANSPORT_SOCKET_NEED_RECEIVER_TASK ())
{
nb_tasks_to_init++;
}
#endif
#endif
initialized_tasks = 0;
......
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