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
Replace surf by surf++ and make it compile
[simgrid.git]
/
src
/
surf
/
cpu_ti.cpp
diff --git
a/src/surf/cpu_ti.cpp
b/src/surf/cpu_ti.cpp
index
a944620
..
3b5020a
100644
(file)
--- a/
src/surf/cpu_ti.cpp
+++ b/
src/surf/cpu_ti.cpp
@@
-1,20
+1,19
@@
#include "cpu_ti.hpp"
#include "cpu_ti.hpp"
-//#include "solver.hpp"
#include "trace_mgr_private.h"
#include "xbt/heap.h"
#ifndef SURF_MODEL_CPUTI_H_
#define SURF_MODEL_CPUTI_H_
#include "trace_mgr_private.h"
#include "xbt/heap.h"
#ifndef SURF_MODEL_CPUTI_H_
#define SURF_MODEL_CPUTI_H_
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surfpp_cpu_tii, surfpp,
+extern "C" {
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_cpu_ti, surf,
"Logging specific to the SURF CPU TRACE INTEGRATION module");
"Logging specific to the SURF CPU TRACE INTEGRATION module");
+}
static xbt_swag_t cpu_ti_running_action_set_that_does_not_need_being_checked;
static xbt_swag_t cpu_ti_modified_cpu;
static xbt_heap_t cpu_ti_action_heap;
static xbt_swag_t cpu_ti_running_action_set_that_does_not_need_being_checked;
static xbt_swag_t cpu_ti_modified_cpu;
static xbt_heap_t cpu_ti_action_heap;
-static CpuTiModelPtr surf_cpu_model = NULL;
-
static void cpu_ti_action_update_index_heap(void *action, int i);
/*********
static void cpu_ti_action_update_index_heap(void *action, int i);
/*********
@@
-805,9
+804,14
@@
void CpuTi::updateRemainingAmount(double now)
}
CpuActionPtr CpuTi::execute(double size)
}
CpuActionPtr CpuTi::execute(double size)
+{
+ return execute(size);
+}
+
+CpuTiActionPtr CpuTi::_execute(double size)
{
XBT_IN("(%s,%g)", m_name, size);
{
XBT_IN("(%s,%g)", m_name, size);
- CpuTiActionPtr action = new CpuTiAction(
surf_cpu
_model, size, p_stateCurrent != SURF_RESOURCE_ON);
+ CpuTiActionPtr action = new CpuTiAction(
(CpuTiModelPtr) p
_model, size, p_stateCurrent != SURF_RESOURCE_ON);
action->p_cpu = this;
action->m_indexHeap = -1;
action->p_cpu = this;
action->m_indexHeap = -1;
@@
-830,7
+834,7
@@
CpuActionPtr CpuTi::sleep(double duration)
duration = MAX(duration, MAXMIN_PRECISION);
XBT_IN("(%s,%g)", m_name, duration);
duration = MAX(duration, MAXMIN_PRECISION);
XBT_IN("(%s,%g)", m_name, duration);
- Cpu
ActionPtr action =
execute(1.0);
+ Cpu
TiActionPtr action = _
execute(1.0);
action->m_maxDuration = duration;
action->m_suspended = 2;
if (duration == NO_MAX_DURATION) {
action->m_maxDuration = duration;
action->m_suspended = 2;
if (duration == NO_MAX_DURATION) {