Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[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 "simix/datatypes.h"
11 #include "smx_smurf_private.h"
12
13 /** @brief File datatype
14     @ingroup m_datatypes_management_details */
15 typedef struct s_smx_file {
16   char *name;                   /**< @brief host name if any */
17   void *data;                   /**< @brief user data */
18 } s_smx_file_t;
19 /** @} */
20
21 void SIMIX_pre_file_read(smx_simcall_t simcall);
22 void SIMIX_pre_file_write(smx_simcall_t simcall);
23 void SIMIX_pre_file_open(smx_simcall_t simcall);
24 void SIMIX_pre_file_close(smx_simcall_t simcall);
25 void SIMIX_pre_file_stat(smx_simcall_t simcall);
26
27 smx_action_t SIMIX_file_read(smx_process_t process, const char* storage, void* ptr, size_t size, size_t nmemb, smx_file_t stream);
28 smx_action_t SIMIX_file_write(smx_process_t process, const char* storage, const void* ptr, size_t size, size_t nmemb, smx_file_t stream);
29 smx_action_t SIMIX_file_open(smx_process_t process, const char* storage, const char* path, const char* mode);
30 smx_action_t SIMIX_file_close(smx_process_t process, const char* storage, smx_file_t fp);
31 smx_action_t SIMIX_file_stat(smx_process_t process, const char* storage, int fd, void* buf);
32
33 void SIMIX_post_io(smx_action_t action);
34 void SIMIX_io_destroy(smx_action_t action);
35 void SIMIX_io_finish(smx_action_t action);
36
37 #endif