-
-/*********
- * MODEL *
- *********/
-static surf_action_t ActionListExtract(simgrid::surf::ActionList* list)
-{
- if (list->empty())
- return nullptr;
- surf_action_t res = &list->front();
- list->pop_front();
- return res;
-}
-
-surf_action_t surf_model_extract_done_action_set(surf_model_t model)
-{
- return ActionListExtract(model->getDoneActionSet());
-}
-
-surf_action_t surf_model_extract_failed_action_set(surf_model_t model){
- return ActionListExtract(model->getFailedActionSet());
-}
-
-int surf_model_running_action_set_size(surf_model_t model){
- return model->getRunningActionSet()->size();
-}
-
-surf_action_t surf_host_close(sg_host_t host, surf_file_t fd){
- return host->pimpl_->close(fd);
-}
-
-surf_action_t surf_host_read(sg_host_t host, surf_file_t fd, sg_size_t size){
- return host->pimpl_->read(fd, size);
-}
-
-surf_action_t surf_host_write(sg_host_t host, surf_file_t fd, sg_size_t size){
- return host->pimpl_->write(fd, size);
-}
-
-int surf_host_file_move(sg_host_t host, surf_file_t fd, const char* fullpath){
- return host->pimpl_->fileMove(fd, fullpath);
-}
-
-void surf_cpu_action_set_bound(surf_action_t action, double bound) {
- static_cast<simgrid::surf::CpuAction*>(action)->setBound(bound);
-}
-
-surf_file_t surf_storage_action_get_file(surf_action_t action){
- return static_cast<simgrid::surf::StorageAction*>(action)->file_;
-}