A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'mc++'
[simgrid.git]
/
src
/
surf
/
surf_interface.hpp
diff --git
a/src/surf/surf_interface.hpp
b/src/surf/surf_interface.hpp
index
cd55b2a
..
a56495f
100644
(file)
--- a/
src/surf/surf_interface.hpp
+++ b/
src/surf/surf_interface.hpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2004-201
3
. The SimGrid Team.
+/* Copyright (c) 2004-201
4
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-10,7
+10,6
@@
#include <xbt.h>
#include <string>
#include <vector>
#include <xbt.h>
#include <string>
#include <vector>
-#include <iostream>
#include <memory>
#include <boost/function.hpp>
#include <boost/intrusive/list.hpp>
#include <memory>
#include <boost/function.hpp>
#include <boost/intrusive/list.hpp>
@@
-63,6
+62,8
@@
XBT_PUBLIC(double) surf_get_clock(void);
extern double sg_sender_gap;
XBT_PUBLIC(int) SURF_CPU_LEVEL; //Surf cpu level
extern double sg_sender_gap;
XBT_PUBLIC(int) SURF_CPU_LEVEL; //Surf cpu level
+extern surf_callback(void, void) surfExitCallbacks;
+
int __surf_is_absolute_file_path(const char *file_path);
/***********
int __surf_is_absolute_file_path(const char *file_path);
/***********
@@
-197,7
+198,7
@@
public:
* @brief share the resources
* @details Share the resources between the actions
*
* @brief share the resources
* @details Share the resources between the actions
*
- * @param
+ * @param
now [TODO]
* @return the date of the next action will finish
*/
virtual double shareResources(double now);
* @return the date of the next action will finish
*/
virtual double shareResources(double now);
@@
-360,15
+361,12
@@
public:
*/
virtual void setState(e_surf_resource_state_t state);
*/
virtual void setState(e_surf_resource_state_t state);
-protected:
- e_surf_resource_state_t m_stateCurrent;
-
private:
private:
- ModelPtr p_model;
const char *p_name;
xbt_dict_t p_properties;
const char *p_name;
xbt_dict_t p_properties;
-
void *p_resource
;
+
ModelPtr p_model
;
bool m_running;
bool m_running;
+ e_surf_resource_state_t m_stateCurrent;
/* LMM */
public:
/* LMM */
public:
@@
-439,14
+437,21
@@
public:
*
* @param state The new state of the current Action
*/
*
* @param state The new state of the current Action
*/
- virtual void setState(e_surf_action_state_t state);
/**< Change state*/
+ virtual void setState(e_surf_action_state_t state);
/**
* @brief Get the bound of the current Action
*
* @return The bound of the current Action
*/
/**
* @brief Get the bound of the current Action
*
* @return The bound of the current Action
*/
- double getBound() {return m_bound;}
+ double getBound();
+
+ /**
+ * @brief Set the bound of the current Action
+ *
+ * @param bound The new bound of the current Action
+ */
+ void setBound(double bound);
/**
* @brief Get the start time of the current action
/**
* @brief Get the start time of the current action
@@
-609,15
+614,6
@@
public:
*/
double getRemainsNoUpdate();
*/
double getRemainsNoUpdate();
-#ifdef HAVE_LATENCY_BOUND_TRACKING
- /**
- * @brief Check if the action is limited by latency.
- *
- * @return 1 if action is limited by latency, 0 otherwise
- */
- int getLatencyLimited();
-#endif
-
/**
* @brief Get the priority of the current Action
*
/**
* @brief Get the priority of the current Action
*
@@
-635,6
+631,8
@@
public:
s_xbt_swag_hookup_t p_stateHookup;
s_xbt_swag_hookup_t p_stateHookup;
+ ModelPtr getModel() {return p_model;}
+
protected:
ActionListPtr p_stateSet;
double m_priority; /**< priority (1.0 by default) */
protected:
ActionListPtr p_stateSet;
double m_priority; /**< priority (1.0 by default) */
@@
-643,8
+641,6
@@
protected:
double m_maxDuration; /*< max_duration (may fluctuate until the task is completed) */
double m_finish; /**< finish time : this is modified during the run and fluctuates until the task is completed */
double m_maxDuration; /*< max_duration (may fluctuate until the task is completed) */
double m_finish; /**< finish time : this is modified during the run and fluctuates until the task is completed */
- ModelPtr getModel() {return p_model;}
-
private:
int resourceUsed(void *resource_id);
private:
int resourceUsed(void *resource_id);
@@
-681,8
+677,6
@@
private:
ActionLmmListPtr p_modifiedSet;
xbt_heap_t p_actionHeap;
int m_selectiveUpdate;
ActionLmmListPtr p_modifiedSet;
xbt_heap_t p_actionHeap;
int m_selectiveUpdate;
- ModelPtr p_model;
- double m_bound; /**< the capping of the CPU use */
bool m_failed;
double m_start; /**< start time */
char *p_category; /**< tracing category for categorized resource utilization monitoring */
bool m_failed;
double m_start; /**< start time */
char *p_category; /**< tracing category for categorized resource utilization monitoring */
@@
-690,7
+684,8
@@
private:
#ifdef HAVE_LATENCY_BOUND_TRACKING
int m_latencyLimited; /**< Set to 1 if is limited by latency, 0 otherwise */
#endif
#ifdef HAVE_LATENCY_BOUND_TRACKING
int m_latencyLimited; /**< Set to 1 if is limited by latency, 0 otherwise */
#endif
- int m_cost;
+ double m_cost;
+ ModelPtr p_model;
void *p_data; /**< for your convenience */
/* LMM */
void *p_data; /**< for your convenience */
/* LMM */
@@
-708,8
+703,8
@@
public:
protected:
lmm_variable_t p_variable;
protected:
lmm_variable_t p_variable;
- double m_lastUpdate;
double m_lastValue;
double m_lastValue;
+ double m_lastUpdate;
int m_suspended;
int m_indexHeap;
enum heap_action_type m_hat;
int m_suspended;
int m_indexHeap;
enum heap_action_type m_hat;