X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9dc2163bdad52675b0891b2fd9cc00131eb8e0d0..9e74a8baa9c785f592bf0694e43cc3fba79e3f17:/include/msg/datatypes.h diff --git a/include/msg/datatypes.h b/include/msg/datatypes.h index b3abf3e950..760a2d89e4 100644 --- a/include/msg/datatypes.h +++ b/include/msg/datatypes.h @@ -1,4 +1,5 @@ -/* Copyright (c) 2004-2012. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2004-2014. The SimGrid Team. + * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -27,7 +28,7 @@ SG_BEGIN_DECL() typedef struct s_smx_rvpoint *msg_mailbox_t; /* ******************************** Environment ************************************ */ -typedef struct s_as *msg_as_t; +typedef struct As *msg_as_t; /* ******************************** Host ************************************ */ @@ -92,25 +93,58 @@ typedef msg_host_t msg_vm_t; typedef msg_host_priv_t msg_vm_priv_t; static inline msg_vm_priv_t MSG_vm_priv(msg_vm_t vm){ - return xbt_lib_get_level(vm, MSG_HOST_LEVEL); + return (msg_vm_priv_t) xbt_lib_get_level(vm, MSG_HOST_LEVEL); } -/* ******************************** File ************************************ */ +/** ******************************** File ************************************ */ + +/** @brief File datatype. +* @ingroup msg_file_management +* +* You should consider this as an opaque object. +*/ +typedef xbt_dictelm_t msg_file_t; +typedef s_xbt_dictelm_t s_msg_file_t; + +extern int MSG_FILE_LEVEL; typedef struct simdata_file *simdata_file_t; -typedef struct msg_file { - char *name; /**< @brief file name */ - size_t size; - simdata_file_t simdata; /**< @brief simulator data */ - void *data; /**< @brief user data */ -} s_msg_file_t; +typedef struct msg_file_priv { + char *fullpath; + sg_size_t size; + char* mount_point; + char* storageId; + char* storage_type; + char* content_type; + void *data; + simdata_file_t simdata; +} s_msg_file_priv_t, *msg_file_priv_t; + +static inline msg_file_priv_t MSG_file_priv(msg_file_t file){ + return (msg_file_priv_t )xbt_lib_get_level(file, MSG_FILE_LEVEL); +} -/** @brief File datatype. - @ingroup msg_file_management - - You should consider this as an opaque object. +/* ******************************** Storage ************************************ */ +/* TODO: PV: to comment */ + +extern int MSG_STORAGE_LEVEL; + +/** @brief Storage datatype. + * @ingroup msg_storage_management + * + * You should consider this as an opaque object. */ -typedef struct msg_file *msg_file_t; +typedef xbt_dictelm_t msg_storage_t; +typedef s_xbt_dictelm_t s_msg_storage_t; + +typedef struct msg_storage_priv { + const char *hostname; + void *data; +} s_msg_storage_priv_t, *msg_storage_priv_t; + +static inline msg_storage_priv_t MSG_storage_priv(msg_storage_t storage){ + return (msg_storage_priv_t )xbt_lib_get_level(storage, MSG_STORAGE_LEVEL); +} /*************** Begin GPU ***************/ typedef struct simdata_gpu_task *simdata_gpu_task_t;