From 19e67d323e30e6407725d0d0ebbc625a341a0838 Mon Sep 17 00:00:00 2001 From: mquinson Date: Thu, 2 Jul 2009 07:58:49 +0000 Subject: [PATCH] move private datatypes into relevant file; kill header files which were loaded only once git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6433 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/Makefile.am | 2 -- src/surf/cpu.c | 23 ++++++++++++++++++++++- src/surf/cpu_private.h | 33 --------------------------------- src/surf/workstation.c | 9 +++++++-- src/surf/workstation_private.h | 26 -------------------------- 5 files changed, 29 insertions(+), 64 deletions(-) delete mode 100644 src/surf/cpu_private.h delete mode 100644 src/surf/workstation_private.h diff --git a/src/Makefile.am b/src/Makefile.am index b1e72d781d..a184411e5d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -40,8 +40,6 @@ EXTRA_DIST= \ surf/maxmin_private.h \ surf/trace_mgr_private.h \ surf/surf_private.h \ - surf/cpu_private.h \ - surf/workstation_private.h \ surf/surfxml_parse.c \ surf/simgrid_dtd.l \ surf/simgrid_dtd.c \ diff --git a/src/surf/cpu.c b/src/surf/cpu.c index 7f26a7c5b2..ee3ab22c52 100644 --- a/src/surf/cpu.c +++ b/src/surf/cpu.c @@ -5,11 +5,32 @@ /* 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. */ -#include "cpu_private.h" +#include "surf_private.h" + +typedef struct surf_action_cpu_Cas01 { + s_surf_action_t generic_action; + lmm_variable_t variable; + int suspended; +} s_surf_action_cpu_Cas01_t, *surf_action_cpu_Cas01_t; + +typedef struct cpu_Cas01 { + s_surf_resource_t generic_resource; + char *name; + double power_scale; + double power_current; + tmgr_trace_event_t power_event; + e_surf_cpu_state_t state_current; + tmgr_trace_event_t state_event; + lmm_constraint_t constraint; + /*Handles the properties that can be added to cpu's */ + xbt_dict_t properties; +} s_cpu_Cas01_t, *cpu_Cas01_t; XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_cpu, surf, "Logging specific to the SURF CPU module"); + + surf_model_t surf_cpu_model = NULL; lmm_system_t cpu_maxmin_system = NULL; diff --git a/src/surf/cpu_private.h b/src/surf/cpu_private.h deleted file mode 100644 index 125ba40111..0000000000 --- a/src/surf/cpu_private.h +++ /dev/null @@ -1,33 +0,0 @@ -/* $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_CPU_PRIVATE_H -#define _SURF_CPU_PRIVATE_H - -#include "surf_private.h" -#include "xbt/dict.h" - -typedef struct surf_action_cpu_Cas01 { - s_surf_action_t generic_action; - lmm_variable_t variable; - int suspended; -} s_surf_action_cpu_Cas01_t, *surf_action_cpu_Cas01_t; - -typedef struct cpu_Cas01 { - s_surf_resource_t generic_resource; - char *name; - double power_scale; - double power_current; - tmgr_trace_event_t power_event; - e_surf_cpu_state_t state_current; - tmgr_trace_event_t state_event; - lmm_constraint_t constraint; - /*Handles the properties that can be added to cpu's */ - xbt_dict_t properties; -} s_cpu_Cas01_t, *cpu_Cas01_t; - -#endif /* _SURF_CPU_PRIVATE_H */ diff --git a/src/surf/workstation.c b/src/surf/workstation.c index 1fb839751e..ce87967565 100644 --- a/src/surf/workstation.c +++ b/src/surf/workstation.c @@ -8,10 +8,15 @@ #include "xbt/ex.h" #include "xbt/dict.h" #include "portable.h" -#include "workstation_private.h" -#include "cpu_private.h" +#include "surf_private.h" #include "network_common.h" +typedef struct workstation_CLM03 { + s_surf_resource_t generic_resource; /* Must remain first to add this to a trace */ + void *cpu; + int id; +} s_workstation_CLM03_t, *workstation_CLM03_t; + XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_workstation, surf, "Logging specific to the SURF workstation module"); diff --git a/src/surf/workstation_private.h b/src/surf/workstation_private.h deleted file mode 100644 index 6aafb39cd5..0000000000 --- a/src/surf/workstation_private.h +++ /dev/null @@ -1,26 +0,0 @@ -/* $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_WORKSTATION_PRIVATE_H -#define _SURF_WORKSTATION_PRIVATE_H - -#include "surf_private.h" - -typedef struct workstation_CLM03 { - s_surf_resource_t generic_resource; /* Must remain first to add this to a trace */ - void *cpu; - int id; -} s_workstation_CLM03_t, *workstation_CLM03_t; - -typedef struct surf_action_parallel_task_CSL05 { - s_surf_action_t generic_action; - lmm_variable_t variable; - double rate; - int suspended; -} s_surf_action_parallel_task_CSL05_t, *surf_action_parallel_task_CSL05_t; - -#endif /* _SURF_WORKSTATION_PRIVATE_H */ -- 2.20.1