Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cleanups
[simgrid.git] / src / simix / smx_io_private.h
1 /* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #ifndef SIMIX_IO_PRIVATE_H
7 #define SIMIX_IO_PRIVATE_H
8
9 #include <xbt/base.h>
10
11 #include "simgrid/simix.h"
12 #include "popping_private.h"
13
14 /** @brief Storage datatype */
15 typedef struct s_smx_storage_priv {
16   void *data;              /**< @brief user data */
17 } s_smx_storage_priv_t;
18
19
20 static inline smx_storage_priv_t SIMIX_storage_priv(smx_storage_t storage){
21   return (smx_storage_priv_t) xbt_lib_get_level(storage, SIMIX_STORAGE_LEVEL);
22 }
23
24 XBT_PRIVATE smx_storage_t SIMIX_storage_create(const char *name, void *storage, void *data);
25 XBT_PRIVATE void SIMIX_storage_destroy(void *s);
26 XBT_PRIVATE smx_activity_t SIMIX_file_read(smx_file_t fd, sg_size_t size, sg_host_t host);
27 XBT_PRIVATE smx_activity_t SIMIX_file_write(smx_file_t fd, sg_size_t size, sg_host_t host);
28 XBT_PRIVATE smx_activity_t SIMIX_file_open(const char* fullpath, sg_host_t host);
29 XBT_PRIVATE smx_activity_t SIMIX_file_close(smx_file_t fd, sg_host_t host);
30 XBT_PRIVATE int SIMIX_file_unlink(smx_file_t fd, sg_host_t host);
31 XBT_PRIVATE sg_size_t SIMIX_file_get_size(smx_actor_t process, smx_file_t fd);
32 XBT_PRIVATE sg_size_t SIMIX_file_tell(smx_actor_t process, smx_file_t fd);
33 XBT_PRIVATE xbt_dynar_t SIMIX_file_get_info(smx_actor_t process, smx_file_t fd);
34 XBT_PRIVATE int SIMIX_file_seek(smx_actor_t process, smx_file_t fd, sg_offset_t offset, int origin);
35 XBT_PRIVATE int SIMIX_file_move(smx_actor_t process, smx_file_t fd, const char* fullpath);
36
37 XBT_PRIVATE sg_size_t SIMIX_storage_get_free_size(smx_actor_t process, smx_storage_t storage);
38 XBT_PRIVATE sg_size_t SIMIX_storage_get_used_size(smx_actor_t process, smx_storage_t storage);
39
40 XBT_PRIVATE xbt_dict_t SIMIX_storage_get_properties(smx_storage_t storage);
41
42 XBT_PRIVATE void SIMIX_io_destroy(smx_activity_t synchro);
43 XBT_PRIVATE void SIMIX_io_finish(smx_activity_t synchro);
44
45 #endif