*
* @license
*
- * See MaRTE OS license
+ * -----------------------------------------------------------------------
+ * Copyright (C) 2006 - 2008 FRESCOR consortium partners:
+ *
+ * Universidad de Cantabria, SPAIN
+ * University of York, UK
+ * Scuola Superiore Sant'Anna, ITALY
+ * Kaiserslautern University, GERMANY
+ * Univ. Politécnica Valencia, SPAIN
+ * Czech Technical University in Prague, CZECH REPUBLIC
+ * ENEA SWEDEN
+ * Thales Communication S.A. FRANCE
+ * Visual Tools S.A. SPAIN
+ * Rapita Systems Ltd UK
+ * Evidence ITALY
+ *
+ * See http://www.frescor.org for a link to partners' websites
+ *
+ * FRESCOR project (FP6/2005/IST/5-034026) is funded
+ * in part by the European Union Sixth Framework Programme
+ * The European Union is not liable of any use that may be
+ * made of this code.
+ *
+ * This file is part of FRESCAN
+ *
+ * FRESCAN is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * FRESCAN is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * distributed with FRESCAN; see file COPYING. If not, write to the
+ * Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ * As a special exception, including FRESCAN header files in a file,
+ * instantiating FRESCAN generics or templates, or linking other files
+ * with FRESCAN objects to produce an executable application, does not
+ * by itself cause the resulting executable application to be covered
+ * by the GNU General Public License. This exception does not
+ * however invalidate any other reasons why the executable file might be
+ * covered by the GNU Public License.
+ * -----------------------------------------------------------------------
*
*/
#include "frescan_data.h"
-#include "frescan_debug.h"
-
-frescan_network_data_t the_networks[FRESCAN_MX_NETWORKS];
-frescan_server_data_t the_servers_pool[FRESCAN_MX_NETWORKS][FRESCAN_MX_IDS];
-freelist_t the_servers_pool_freelist[FRESCAN_MX_NETWORKS];
-frescan_server_data_t the_active_servers[FRESCAN_MX_NETWORKS];
-/**
- * frescan_data_init() - init the data global variables
- *
- */
+frescan_network_data_t frescan_data[FRESCAN_MX_NETWORKS];
int frescan_data_init(int fd, frescan_init_params_t *params)
{
frescan_prio_t prio;
frescan_node_t src;
- the_networks[params->net].fd = fd;
- the_networks[params->net].local_node = params->node;
- the_networks[params->net].last_packet = NULL;
- the_networks[params->net].last_packet_prio = 0;
+ frescan_data[params->net].fd = fd;
+ frescan_data[params->net].local_node = params->node;
+ frescan_data[params->net].last_packet = NULL;
+ frescan_data[params->net].last_packet_prio = 0;
- FRESCAN_CREATE_LOCK(&the_networks[params->net].lock);
+ FRESCAN_CREATE_LOCK(&frescan_data[params->net].lock);
for(id=0; id<FRESCAN_MX_IDS; id++) {
for(src=0; src<FRESCAN_MX_NODES; src++) {
- the_networks[params->net].id_queues[src][id] = NULL;
+ frescan_data[params->net].id_queues[src][id] = NULL;
}
}
for(prio=0; prio<FRESCAN_MX_PRIOS; prio++) {
for(src=0; src<FRESCAN_MX_NODES; src++) {
- the_networks[params->net].id_fp_queues[src][prio] = NULL;
+ frescan_data[params->net].id_fp_queues[src][prio] = NULL;
}
}