Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix prototype declaration for gtnets compilation
[simgrid.git] / src / msg / msg_io.c
1 /* Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012. 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 #include "msg_private.h"
8
9 // FILE
10
11 size_t MSG_file_read(const char* storage, void* ptr, size_t size, size_t nmemb,  m_file_t stream)
12 {
13   return simcall_file_read(storage, ptr, size, nmemb, (smx_file_t)stream);
14 }
15
16 size_t MSG_file_write(const char* storage, const void* ptr, size_t size, size_t nmemb, m_file_t stream)
17 {
18   return simcall_file_write(storage, ptr, size, nmemb, (smx_file_t)stream);
19 }
20
21 m_file_t MSG_file_open(const char* storage, const char* path, const char* mode)
22 {
23   return (m_file_t) simcall_file_open(storage, path, mode);
24 }
25
26 int MSG_file_close(const char* storage, m_file_t fp)
27 {
28   return simcall_file_close(storage, (smx_file_t)fp);
29 }
30
31 int MSG_file_stat(const char* storage, int fd, void* buf)
32 {
33   return simcall_file_stat(storage, fd, buf);
34 }