double cost; /**< cost */
double priority; /**< priority (1.0 by default) */
double max_duration; /**< max_duration (may fluctuate until
double cost; /**< cost */
double priority; /**< priority (1.0 by default) */
double max_duration; /**< max_duration (may fluctuate until
#ifdef HAVE_LATENCY_BOUND_TRACKING
int latency_limited; /**< Set to 1 if is limited by latency, 0 otherwise */
#endif
double start; /**< start time */
double finish; /**< finish time : this is modified during the run
#ifdef HAVE_LATENCY_BOUND_TRACKING
int latency_limited; /**< Set to 1 if is limited by latency, 0 otherwise */
#endif
double start; /**< start time */
double finish; /**< finish time : this is modified during the run
typedef struct surf_storage_model_extension_public {
surf_action_t(*open) (void *storage, const char* mount, const char* path, const char* mode);
surf_action_t(*close) (void *storage, surf_file_t fp);
typedef struct surf_storage_model_extension_public {
surf_action_t(*open) (void *storage, const char* mount, const char* path, const char* mode);
surf_action_t(*close) (void *storage, surf_file_t fp);
- surf_action_t(*read) (void *storage, void* ptr, size_t size, size_t nmemb, surf_file_t stream);
+ surf_action_t(*read) (void *storage, void* ptr, double size, size_t nmemb, surf_file_t stream);
surf_action_t(*write) (void *storage, const void* ptr, size_t size, size_t nmemb, surf_file_t stream);
surf_action_t(*stat) (void *storage, surf_file_t stream);
surf_action_t(*write) (void *storage, const void* ptr, size_t size, size_t nmemb, surf_file_t stream);
surf_action_t(*stat) (void *storage, surf_file_t stream);
void* (*create_resource) (const char* id, const char* model, const char* type_id, const char *content);
} s_surf_model_extension_storage_t;
void* (*create_resource) (const char* id, const char* model, const char* type_id, const char *content);
} s_surf_model_extension_storage_t;
*/
typedef struct surf_workstation_model_extension_public {
surf_action_t(*execute) (void *workstation, double size); /**< Execute a computation amount on a workstation
*/
typedef struct surf_workstation_model_extension_public {
surf_action_t(*execute) (void *workstation, double size); /**< Execute a computation amount on a workstation
surf_action_t(*sleep) (void *workstation, double duration); /**< Make a workstation sleep during a given duration */
e_surf_resource_state_t(*get_state) (void *workstation); /**< Return the CPU state of a workstation */
double (*get_speed) (void *workstation, double load); /**< Return the speed of a workstation */
surf_action_t(*sleep) (void *workstation, double duration); /**< Make a workstation sleep during a given duration */
e_surf_resource_state_t(*get_state) (void *workstation); /**< Return the CPU state of a workstation */
double (*get_speed) (void *workstation, double load); /**< Return the speed of a workstation */
surf_action_t(*read) (void *workstation, void* ptr, size_t size, size_t nmemb, surf_file_t stream);
surf_action_t(*write) (void *workstation, const void* ptr, size_t size, size_t nmemb, surf_file_t stream);
surf_action_t(*stat) (void *workstation, surf_file_t stream);
surf_action_t(*read) (void *workstation, void* ptr, size_t size, size_t nmemb, surf_file_t stream);
surf_action_t(*write) (void *workstation, const void* ptr, size_t size, size_t nmemb, surf_file_t stream);
surf_action_t(*stat) (void *workstation, surf_file_t stream);
int (*link_shared) (const void *link);
xbt_dict_t(*get_properties) (const void *resource);
void* (*link_create_resource) (const char *name,
int (*link_shared) (const void *link);
xbt_dict_t(*get_properties) (const void *resource);
void* (*link_create_resource) (const char *name,
void surf_model_exit(surf_model_t model);
static inline void *surf_cpu_resource_by_name(const char *name) {
void surf_model_exit(surf_model_t model);
static inline void *surf_cpu_resource_by_name(const char *name) {
}
static inline void *surf_storage_resource_by_name(const char *name){
return xbt_lib_get_or_null(storage_lib, name, SURF_STORAGE_LEVEL);
}
static inline void *surf_storage_resource_by_name(const char *name){
return xbt_lib_get_or_null(storage_lib, name, SURF_STORAGE_LEVEL);