-/* Copyright (c) 2004-2013. The SimGrid Team.
+/* Copyright (c) 2004-2014. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include <xbt.h>
#include <string>
#include <vector>
-#include <iostream>
#include <memory>
#include <boost/function.hpp>
#include <boost/intrusive/list.hpp>
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);
/***********
* @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);
*/
virtual void setState(e_surf_resource_state_t state);
-protected:
- e_surf_resource_state_t m_stateCurrent;
-
private:
- ModelPtr p_model;
const char *p_name;
xbt_dict_t p_properties;
- void *p_resource;
+ ModelPtr p_model;
bool m_running;
+ e_surf_resource_state_t m_stateCurrent;
/* LMM */
public:
*
* @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
*/
- 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
*/
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
*
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 */
#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 */
protected:
lmm_variable_t p_variable;
- double m_lastUpdate;
double m_lastValue;
+ double m_lastUpdate;
int m_suspended;
int m_indexHeap;
enum heap_action_type m_hat;