const char* content_name, const char* content_type, xbt_dict_t properties,
const char* attach)
{
const char* content_name, const char* content_type, xbt_dict_t properties,
const char* attach)
{
double Bwrite = surf_parse_get_bandwidth((char*)xbt_dict_get(storage_type->model_properties, "Bwrite"));
double Bconnection = surf_parse_get_bandwidth((char*)xbt_dict_get(storage_type->model_properties, "Bconnection"));
double Bwrite = surf_parse_get_bandwidth((char*)xbt_dict_get(storage_type->model_properties, "Bwrite"));
double Bconnection = surf_parse_get_bandwidth((char*)xbt_dict_get(storage_type->model_properties, "Bconnection"));
- StoragePtr storage = new StorageN11(this, id, properties, p_maxminSystem,
+ Storage *storage = new StorageN11(this, id, properties, p_maxminSystem,
Bread, Bwrite, Bconnection, type_id, (char *)content_name,
xbt_strdup(content_type), storage_type->size, (char *) attach);
Bread, Bwrite, Bconnection, type_id, (char *)content_name,
xbt_strdup(content_type), storage_type->size, (char *) attach);
double min_completion = shareResourcesMaxMin(getRunningActionSet(),
p_maxminSystem, lmm_solve);
double min_completion = shareResourcesMaxMin(getRunningActionSet(),
p_maxminSystem, lmm_solve);
// Foreach write action on disk
xbt_dynar_foreach(storage->p_writeActions, j, _write_action)
{
// Foreach write action on disk
xbt_dynar_foreach(storage->p_writeActions, j, _write_action)
{
for(ActionList::iterator it(actionSet->begin()), itNext=it, itend(actionSet->end())
; it != itend ; it=itNext) {
++itNext;
for(ActionList::iterator it(actionSet->begin()), itNext=it, itend(actionSet->end())
; it != itend ; it=itNext) {
++itNext;
xbt_dict_t properties, lmm_system_t maxminSystem, double bread,
double bwrite, double bconnection, const char* type_id, char *content_name,
char *content_type, sg_size_t size, char *attach)
xbt_dict_t properties, lmm_system_t maxminSystem, double bread,
double bwrite, double bconnection, const char* type_id, char *content_name,
char *content_type, sg_size_t size, char *attach)
XBT_DEBUG("Create resource with Bconnection '%f' Bread '%f' Bwrite '%f' and Size '%llu'", bconnection, bread, bwrite, size);
}
XBT_DEBUG("Create resource with Bconnection '%f' Bread '%f' Bwrite '%f' and Size '%llu'", bconnection, bread, bwrite, size);
}
- StorageActionPtr action = new StorageN11Action(getModel(), 0, getState() != SURF_RESOURCE_ON, this, OPEN);
+ StorageAction *action = new StorageN11Action(getModel(), 0, getState() != SURF_RESOURCE_ON, this, OPEN);
{
char *filename = fd->name;
XBT_DEBUG("\tClose file '%s' size '%llu'", filename, fd->size);
// unref write actions from storage
void *_write_action;
{
char *filename = fd->name;
XBT_DEBUG("\tClose file '%s' size '%llu'", filename, fd->size);
// unref write actions from storage
void *_write_action;
if ((write_action->p_file) == fd) {
xbt_dynar_cursor_rm(p_writeActions, &i);
write_action->unref();
if ((write_action->p_file) == fd) {
xbt_dynar_cursor_rm(p_writeActions, &i);
write_action->unref();
- StorageActionPtr action = new StorageN11Action(getModel(), 0, getState() != SURF_RESOURCE_ON, this, CLOSE);
+ StorageAction *action = new StorageN11Action(getModel(), 0, getState() != SURF_RESOURCE_ON, this, CLOSE);
- StorageActionPtr action = new StorageN11Action(getModel(), size, getState() != SURF_RESOURCE_ON, this, READ);
+ StorageAction *action = new StorageN11Action(getModel(), size, getState() != SURF_RESOURCE_ON, this, READ);
{
char *filename = fd->name;
XBT_DEBUG("\tWrite file '%s' size '%llu/%llu'",filename,size,fd->size);
{
char *filename = fd->name;
XBT_DEBUG("\tWrite file '%s' size '%llu/%llu'",filename,size,fd->size);
- StorageActionPtr action = new StorageN11Action(getModel(), size, getState() != SURF_RESOURCE_ON, this, WRITE);
+ StorageAction *action = new StorageN11Action(getModel(), size, getState() != SURF_RESOURCE_ON, this, WRITE);
-StorageN11Action::StorageN11Action(ModelPtr model, double cost, bool failed, StoragePtr storage, e_surf_action_storage_type_t type)
+StorageN11Action::StorageN11Action(Model *model, double cost, bool failed, Storage *storage, e_surf_action_storage_type_t type)
: StorageAction(model, cost, failed,
lmm_variable_new(model->getMaxminSystem(), this, 1.0, -1.0 , 3),
storage, type) {
: StorageAction(model, cost, failed,
lmm_variable_new(model->getMaxminSystem(), this, 1.0, -1.0 , 3),
storage, type) {
p_stateSet->erase(p_stateSet->iterator_to(*this));
if (getVariable())
lmm_variable_free(getModel()->getMaxminSystem(), getVariable());
p_stateSet->erase(p_stateSet->iterator_to(*this));
if (getVariable())
lmm_variable_free(getModel()->getMaxminSystem(), getVariable());