A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Parallel implementation for Boost.Context context
[simgrid.git]
/
src
/
simix
/
smx_io.c
diff --git
a/src/simix/smx_io.c
b/src/simix/smx_io.c
index
365c90b
..
118b800
100644
(file)
--- a/
src/simix/smx_io.c
+++ b/
src/simix/smx_io.c
@@
-52,12
+52,12
@@
void SIMIX_storage_destroy(void *s)
//SIMIX FILE READ
void simcall_HANDLER_file_read(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, smx_host_t host)
{
//SIMIX FILE READ
void simcall_HANDLER_file_read(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, smx_host_t host)
{
- smx_synchro_t synchro = SIMIX_file_read(
simcall->issuer,
fd, size, host);
+ smx_synchro_t synchro = SIMIX_file_read(fd, size, host);
xbt_fifo_push(synchro->simcalls, simcall);
simcall->issuer->waiting_synchro = synchro;
}
xbt_fifo_push(synchro->simcalls, simcall);
simcall->issuer->waiting_synchro = synchro;
}
-smx_synchro_t SIMIX_file_read(smx_
process_t process, smx_
file_t fd, sg_size_t size, smx_host_t host)
+smx_synchro_t SIMIX_file_read(smx_file_t fd, sg_size_t size, smx_host_t host)
{
smx_synchro_t synchro;
{
smx_synchro_t synchro;
@@
-70,9
+70,7
@@
smx_synchro_t SIMIX_file_read(smx_process_t process, smx_file_t fd, sg_size_t si
synchro = xbt_mallocator_get(simix_global->synchro_mallocator);
synchro->type = SIMIX_SYNC_IO;
synchro->name = NULL;
synchro = xbt_mallocator_get(simix_global->synchro_mallocator);
synchro->type = SIMIX_SYNC_IO;
synchro->name = NULL;
-#ifdef HAVE_TRACING
synchro->category = NULL;
synchro->category = NULL;
-#endif
synchro->io.host = host;
synchro->io.surf_io = surf_workstation_read(host, fd->surf_file, size);
synchro->io.host = host;
synchro->io.surf_io = surf_workstation_read(host, fd->surf_file, size);
@@
-86,12
+84,12
@@
smx_synchro_t SIMIX_file_read(smx_process_t process, smx_file_t fd, sg_size_t si
//SIMIX FILE WRITE
void simcall_HANDLER_file_write(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, smx_host_t host)
{
//SIMIX FILE WRITE
void simcall_HANDLER_file_write(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, smx_host_t host)
{
- smx_synchro_t synchro = SIMIX_file_write(
simcall->issuer,
fd, size, host);
+ smx_synchro_t synchro = SIMIX_file_write(fd, size, host);
xbt_fifo_push(synchro->simcalls, simcall);
simcall->issuer->waiting_synchro = synchro;
}
xbt_fifo_push(synchro->simcalls, simcall);
simcall->issuer->waiting_synchro = synchro;
}
-smx_synchro_t SIMIX_file_write(smx_
process_t process, smx_
file_t fd, sg_size_t size, smx_host_t host)
+smx_synchro_t SIMIX_file_write(smx_file_t fd, sg_size_t size, smx_host_t host)
{
smx_synchro_t synchro;
{
smx_synchro_t synchro;
@@
-104,9
+102,7
@@
smx_synchro_t SIMIX_file_write(smx_process_t process, smx_file_t fd, sg_size_t s
synchro = xbt_mallocator_get(simix_global->synchro_mallocator);
synchro->type = SIMIX_SYNC_IO;
synchro->name = NULL;
synchro = xbt_mallocator_get(simix_global->synchro_mallocator);
synchro->type = SIMIX_SYNC_IO;
synchro->name = NULL;
-#ifdef HAVE_TRACING
synchro->category = NULL;
synchro->category = NULL;
-#endif
synchro->io.host = host;
synchro->io.surf_io = surf_workstation_write(host, fd->surf_file, size);
synchro->io.host = host;
synchro->io.surf_io = surf_workstation_write(host, fd->surf_file, size);
@@
-120,12
+116,12
@@
smx_synchro_t SIMIX_file_write(smx_process_t process, smx_file_t fd, sg_size_t s
//SIMIX FILE OPEN
void simcall_HANDLER_file_open(smx_simcall_t simcall, const char* fullpath, smx_host_t host)
{
//SIMIX FILE OPEN
void simcall_HANDLER_file_open(smx_simcall_t simcall, const char* fullpath, smx_host_t host)
{
- smx_synchro_t synchro = SIMIX_file_open(
simcall->issuer,
fullpath, host);
+ smx_synchro_t synchro = SIMIX_file_open(fullpath, host);
xbt_fifo_push(synchro->simcalls, simcall);
simcall->issuer->waiting_synchro = synchro;
}
xbt_fifo_push(synchro->simcalls, simcall);
simcall->issuer->waiting_synchro = synchro;
}
-smx_synchro_t SIMIX_file_open(
smx_process_t process,
const char* fullpath, smx_host_t host)
+smx_synchro_t SIMIX_file_open(const char* fullpath, smx_host_t host)
{
smx_synchro_t synchro;
{
smx_synchro_t synchro;
@@
-138,9
+134,7
@@
smx_synchro_t SIMIX_file_open(smx_process_t process, const char* fullpath, smx_h
synchro = xbt_mallocator_get(simix_global->synchro_mallocator);
synchro->type = SIMIX_SYNC_IO;
synchro->name = NULL;
synchro = xbt_mallocator_get(simix_global->synchro_mallocator);
synchro->type = SIMIX_SYNC_IO;
synchro->name = NULL;
-#ifdef HAVE_TRACING
synchro->category = NULL;
synchro->category = NULL;
-#endif
synchro->io.host = host;
synchro->io.surf_io = surf_workstation_open(host, fullpath);
synchro->io.host = host;
synchro->io.surf_io = surf_workstation_open(host, fullpath);
@@
-154,12
+148,12
@@
smx_synchro_t SIMIX_file_open(smx_process_t process, const char* fullpath, smx_h
//SIMIX FILE CLOSE
void simcall_HANDLER_file_close(smx_simcall_t simcall, smx_file_t fd, smx_host_t host)
{
//SIMIX FILE CLOSE
void simcall_HANDLER_file_close(smx_simcall_t simcall, smx_file_t fd, smx_host_t host)
{
- smx_synchro_t synchro = SIMIX_file_close(
simcall->issuer,
fd, host);
+ smx_synchro_t synchro = SIMIX_file_close(fd, host);
xbt_fifo_push(synchro->simcalls, simcall);
simcall->issuer->waiting_synchro = synchro;
}
xbt_fifo_push(synchro->simcalls, simcall);
simcall->issuer->waiting_synchro = synchro;
}
-smx_synchro_t SIMIX_file_close(smx_
process_t process, smx_
file_t fd, smx_host_t host)
+smx_synchro_t SIMIX_file_close(smx_file_t fd, smx_host_t host)
{
smx_synchro_t synchro;
{
smx_synchro_t synchro;
@@
-172,9
+166,7
@@
smx_synchro_t SIMIX_file_close(smx_process_t process, smx_file_t fd, smx_host_t
synchro = xbt_mallocator_get(simix_global->synchro_mallocator);
synchro->type = SIMIX_SYNC_IO;
synchro->name = NULL;
synchro = xbt_mallocator_get(simix_global->synchro_mallocator);
synchro->type = SIMIX_SYNC_IO;
synchro->name = NULL;
-#ifdef HAVE_TRACING
synchro->category = NULL;
synchro->category = NULL;
-#endif
synchro->io.host = host;
synchro->io.surf_io = surf_workstation_close(host, fd->surf_file);
synchro->io.host = host;
synchro->io.surf_io = surf_workstation_close(host, fd->surf_file);
@@
-187,12
+179,7
@@
smx_synchro_t SIMIX_file_close(smx_process_t process, smx_file_t fd, smx_host_t
//SIMIX FILE UNLINK
//SIMIX FILE UNLINK
-int simcall_HANDLER_file_unlink(smx_simcall_t simcall, smx_file_t fd, smx_host_t host)
-{
- return SIMIX_file_unlink(simcall->issuer, fd, host);
-}
-
-int SIMIX_file_unlink(smx_process_t process, smx_file_t fd, smx_host_t host)
+int SIMIX_file_unlink(smx_file_t fd, smx_host_t host)
{
/* check if the host is active */
if (surf_resource_get_state(surf_workstation_resource_priv(host)) != SURF_RESOURCE_ON) {
{
/* check if the host is active */
if (surf_resource_get_state(surf_workstation_resource_priv(host)) != SURF_RESOURCE_ON) {
@@
-286,9
+273,6
@@
sg_size_t SIMIX_storage_get_used_size(smx_process_t process, smx_storage_t stora
return surf_storage_get_used_size(storage);
}
return surf_storage_get_used_size(storage);
}
-xbt_dict_t simcall_HANDLER_storage_get_properties(smx_simcall_t simcall, smx_storage_t storage){
- return SIMIX_storage_get_properties(storage);
-}
xbt_dict_t SIMIX_storage_get_properties(smx_storage_t storage){
xbt_assert((storage != NULL), "Invalid parameters (simix storage is NULL)");
return surf_resource_get_properties(surf_storage_resource_priv(storage));
xbt_dict_t SIMIX_storage_get_properties(smx_storage_t storage){
xbt_assert((storage != NULL), "Invalid parameters (simix storage is NULL)");
return surf_resource_get_properties(surf_storage_resource_priv(storage));
@@
-299,10
+283,6
@@
const char* SIMIX_storage_get_name(smx_storage_t storage){
return sg_storage_name(storage);
}
return sg_storage_name(storage);
}
-xbt_dict_t simcall_HANDLER_storage_get_content(smx_simcall_t simcall, smx_storage_t storage){
- return SIMIX_storage_get_content(storage);
-}
-
xbt_dict_t SIMIX_storage_get_content(smx_storage_t storage){
xbt_assert((storage != NULL), "Invalid parameters (simix storage is NULL)");
return surf_storage_get_content(storage);
xbt_dict_t SIMIX_storage_get_content(smx_storage_t storage){
xbt_assert((storage != NULL), "Invalid parameters (simix storage is NULL)");
return surf_storage_get_content(storage);