From 12cdc9f3fef6c84dea9a3eb4602c2183d8bd3a9e Mon Sep 17 00:00:00 2001 From: alegrand Date: Sat, 15 Mar 2008 20:34:40 +0000 Subject: [PATCH] Move a definition around so that other network models don't need to see CM02 internals... git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5295 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/Makefile.am | 1 + src/surf/network_common.h | 16 ++++++++++++++++ src/surf/network_private.h | 4 +--- src/surf/workstation.c | 2 +- 4 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 src/surf/network_common.h diff --git a/src/Makefile.am b/src/Makefile.am index 82d91030a2..646b806ea7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -49,6 +49,7 @@ EXTRA_DIST= \ surf/simgrid_dtd.c \ surf/simgrid.dtd \ surf/network_private.h \ + surf/network_common.h \ surf/network_gtnets_private.h \ \ include/surf/maxmin.h \ diff --git a/src/surf/network_common.h b/src/surf/network_common.h new file mode 100644 index 0000000000..6e26f2ef0a --- /dev/null +++ b/src/surf/network_common.h @@ -0,0 +1,16 @@ +/* $Id$ */ + +/* Copyright (c) 2004 Arnaud Legrand. All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + +#ifndef _SURF_NETWORK_COMMON_H +#define _SURF_NETWORK_COMMON_H + +#include "xbt/dict.h" + +extern xbt_dict_t network_card_set; + + +#endif /* _SURF_NETWORK_COMMON_H */ diff --git a/src/surf/network_private.h b/src/surf/network_private.h index cba58fbacc..9b1ee7667a 100644 --- a/src/surf/network_private.h +++ b/src/surf/network_private.h @@ -9,6 +9,7 @@ #define _SURF_NETWORK_PRIVATE_H #include "surf_private.h" +#include "network_common.h" #include "xbt/dict.h" typedef struct network_link_CM02 { @@ -44,9 +45,6 @@ typedef struct surf_action_network_CM02 { network_card_CM02_t dst; } s_surf_action_network_CM02_t, *surf_action_network_CM02_t; -extern xbt_dict_t network_card_set; - - extern int card_number; extern link_CM02_t **routing_table; extern int *routing_table_size; diff --git a/src/surf/workstation.c b/src/surf/workstation.c index 379cf3222d..733aac7b8e 100644 --- a/src/surf/workstation.c +++ b/src/surf/workstation.c @@ -10,7 +10,7 @@ #include "portable.h" #include "workstation_private.h" #include "cpu_private.h" -#include "network_private.h" +#include "network_common.h" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_workstation, surf, "Logging specific to the SURF workstation module"); -- 2.20.1