Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
0fd7e616696d85780c61119cbbb5d9a1f88bc22b
[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 void SIMIX_pre_file_read(smx_simcall_t simcall, void *ptr, size_t size,
14                          size_t nmemb, smx_file_t fd);
15 void SIMIX_pre_file_write(smx_simcall_t simcall, const void *ptr, size_t size,
16                           size_t nmemb, smx_file_t fd);
17 void SIMIX_pre_file_open(smx_simcall_t simcall, const char* mount,
18                          const char* path);
19 void SIMIX_pre_file_close(smx_simcall_t simcall, smx_file_t fd);
20 int SIMIX_pre_file_unlink(smx_simcall_t simcall, smx_file_t fd);
21 void SIMIX_pre_file_ls(smx_simcall_t simcall,
22                        const char* mount, const char* path);
23 size_t SIMIX_pre_file_get_size(smx_simcall_t simcall, smx_file_t fd);
24
25 smx_action_t SIMIX_file_read(smx_process_t process, void* ptr, size_t size,
26                              size_t nmemb, smx_file_t fd);
27 smx_action_t SIMIX_file_write(smx_process_t process, const void* ptr,
28                               size_t size, size_t nmemb, smx_file_t fd);
29 smx_action_t SIMIX_file_open(smx_process_t process, const char* storage,
30                              const char* path);
31 smx_action_t SIMIX_file_close(smx_process_t process, smx_file_t fd);
32 int SIMIX_file_unlink(smx_process_t process, smx_file_t fd);
33 smx_action_t SIMIX_file_ls(smx_process_t process, const char *mount,
34                            const char *path);
35 size_t SIMIX_file_get_size(smx_process_t process, smx_file_t fd);
36
37 void SIMIX_post_io(smx_action_t action);
38 void SIMIX_io_destroy(smx_action_t action);
39 void SIMIX_io_finish(smx_action_t action);
40
41 // pre prototypes
42
43 #endif