- //MSG_file_read(file, MSG_file_get_size(file));
- MSG_file_write(file, 500000);
-
- XBT_INFO("Size of %s: %llu", MSG_file_get_name(file), MSG_file_get_size(file));
+ XBT_INFO("process %d is writing!", id);
+ MSG_file_write(file, 3000000);
+ XBT_INFO("process %d goes to sleep for %d seconds", id, id);
+ MSG_process_sleep(id);
+ XBT_INFO("process %d is writing again!", id);
+ MSG_file_write(file, 3000000);
+ XBT_INFO("process %d goes to sleep for %d seconds", id, 6 - id);
+ MSG_process_sleep(6-id);
+ XBT_INFO("process %d is reading!", id);
+ MSG_file_seek(file, 0, SEEK_SET);
+ MSG_file_read(file, 3000000);
+ XBT_INFO("process %d goes to sleep for %d seconds", id, id);
+ MSG_process_sleep(id);
+ XBT_INFO("process %d is reading again!", id);
+ MSG_file_seek(file, 0, SEEK_SET);
+ MSG_file_read(file, 3000000);
+
+ XBT_INFO("process %d => Size of %s: %llu", id, MSG_file_get_name(file), MSG_file_get_size(file));