Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make the commit on file read and write compile with all warning
authornavarro <navarro@caraja.(none)>
Tue, 31 Jan 2012 13:22:07 +0000 (14:22 +0100)
committernavarro <navarro@caraja.(none)>
Tue, 31 Jan 2012 13:22:07 +0000 (14:22 +0100)
examples/msg/io/file.c
src/simix/smx_smurf.c
src/simix/smx_smurf_private.h

index f5eca2a..5c58289 100644 (file)
@@ -18,9 +18,9 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(file,
 int host(int argc, char *argv[])
 {
   size_t read = simcall_file_read(NULL,0,0,NULL);
 int host(int argc, char *argv[])
 {
   size_t read = simcall_file_read(NULL,0,0,NULL);
-  XBT_INFO("Host '%s' read",MSG_host_get_name(MSG_host_self()) );
+  XBT_INFO("Host '%s' read %ld",MSG_host_get_name(MSG_host_self()),read);
   size_t write = simcall_file_write(NULL,0,0,NULL);
   size_t write = simcall_file_write(NULL,0,0,NULL);
-  XBT_INFO("Host '%s' write",MSG_host_get_name(MSG_host_self()) );
+  XBT_INFO("Host '%s' write %ld",MSG_host_get_name(MSG_host_self()), write);
   return 0;
 }
 
   return 0;
 }
 
index 8629749..06a084e 100644 (file)
@@ -489,6 +489,15 @@ void SIMIX_simcall_pre(smx_simcall_t simcall, int value)
       SIMIX_pre_file_write(simcall);
       break;
 
       SIMIX_pre_file_write(simcall);
       break;
 
+    case SIMCALL_FILE_OPEN:
+      break;
+
+    case SIMCALL_FILE_CLOSE:
+      break;
+
+    case SIMCALL_FILE_STAT:
+      break;
+
     case SIMCALL_NONE:
       THROWF(arg_error,0,"Asked to do the noop syscall on %s@%s",
           SIMIX_process_get_name(simcall->issuer),
     case SIMCALL_NONE:
       THROWF(arg_error,0,"Asked to do the noop syscall on %s@%s",
           SIMIX_process_get_name(simcall->issuer),
index da45db6..4135e30 100644 (file)
@@ -522,6 +522,18 @@ typedef struct s_smx_simcall {
       smx_file_t* stream;
       size_t result;
     } file_write;
       smx_file_t* stream;
       size_t result;
     } file_write;
+
+    struct {
+      const char* path;
+      const char* mode;
+      smx_file_t* result;
+    } file_open;
+
+    struct {
+      smx_file_t* fp;
+      int result;
+    } file_close;
+
   };
 } s_smx_simcall_t, *smx_simcall_t;
 
   };
 } s_smx_simcall_t, *smx_simcall_t;