Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix reverted commit 28937161936e11ceac5acccf0b547055cc67a79e.
[simgrid.git] / src / simix / smx_io_private.h
1 /* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #ifndef _SIMIX_IO_PRIVATE_H
8 #define _SIMIX_IO_PRIVATE_H
9
10 #include "simgrid/simix.h"
11 #include "smx_smurf_private.h"
12
13 static inline smx_storage_priv_t SIMIX_storage_priv(smx_storage_t storage){
14   return xbt_lib_get_level(storage, SIMIX_STORAGE_LEVEL);
15 }
16
17 smx_storage_t SIMIX_storage_create(const char *name, void *storage, void *data);
18 void* SIMIX_pre_file_get_data(smx_simcall_t simcall,smx_file_t fd);
19 void SIMIX_pre_file_set_data(smx_simcall_t simcall, smx_file_t fd, void *data);
20 void SIMIX_pre_file_read(smx_simcall_t simcall, size_t size, smx_file_t fd);
21 void SIMIX_pre_file_write(smx_simcall_t simcall, size_t size, smx_file_t fd);
22 void SIMIX_pre_file_open(smx_simcall_t simcall, const char* mount,
23                          const char* path);
24 void SIMIX_pre_file_close(smx_simcall_t simcall, smx_file_t fd);
25 int SIMIX_pre_file_unlink(smx_simcall_t simcall, smx_file_t fd);
26 void SIMIX_pre_file_ls(smx_simcall_t simcall,
27                        const char* mount, const char* path);
28 size_t SIMIX_pre_file_get_size(smx_simcall_t simcall, smx_file_t fd);
29 xbt_dynar_t SIMIX_pre_file_get_info(smx_simcall_t simcall, smx_file_t fd);
30
31 void* SIMIX_file_get_data(smx_file_t fd);
32 void SIMIX_file_set_data(smx_file_t fd, void *data);
33 smx_action_t SIMIX_file_read(smx_process_t process, size_t size,
34                              smx_file_t fd);
35 smx_action_t SIMIX_file_write(smx_process_t process, size_t size, 
36                               smx_file_t fd);
37 smx_action_t SIMIX_file_open(smx_process_t process, const char* storage,
38                              const char* path);
39 smx_action_t SIMIX_file_close(smx_process_t process, smx_file_t fd);
40 int SIMIX_file_unlink(smx_process_t process, smx_file_t fd);
41 smx_action_t SIMIX_file_ls(smx_process_t process, const char *mount,
42                            const char *path);
43 size_t SIMIX_file_get_size(smx_process_t process, smx_file_t fd);
44 xbt_dynar_t SIMIX_file_get_info(smx_process_t process, smx_file_t fd);
45
46 size_t SIMIX_pre_storage_get_free_size(smx_simcall_t simcall,const char* name);
47 size_t SIMIX_storage_get_free_size(smx_process_t process,const char* name);
48
49 size_t SIMIX_pre_storage_get_used_size(smx_simcall_t simcall,const char* name);
50 size_t SIMIX_storage_get_used_size(smx_process_t process,const char* name);
51
52 xbt_dict_t SIMIX_storage_get_properties(smx_storage_t storage);
53 xbt_dict_t SIMIX_pre_storage_get_properties(smx_simcall_t, smx_storage_t);
54
55 void SIMIX_pre_storage_set_data(smx_simcall_t, smx_storage_t, void*);
56 void* SIMIX_pre_storage_get_data(smx_simcall_t, smx_storage_t);
57
58 void SIMIX_post_io(smx_action_t action);
59 void SIMIX_io_destroy(smx_action_t action);
60 void SIMIX_io_finish(smx_action_t action);
61
62 // pre prototypes
63
64 #endif