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
Make mailbox matching functions return a bool.
[simgrid.git]
/
src
/
smpi
/
mpi
/
smpi_request.cpp
diff --git
a/src/smpi/mpi/smpi_request.cpp
b/src/smpi/mpi/smpi_request.cpp
index
c907155
..
6011cd7
100644
(file)
--- a/
src/smpi/mpi/smpi_request.cpp
+++ b/
src/smpi/mpi/smpi_request.cpp
@@
-108,7
+108,7
@@
void Request::unref(MPI_Request* request)
}
}
}
}
-
int
Request::match_recv(void* a, void* b, simgrid::kernel::activity::CommImpl*)
+
bool
Request::match_recv(void* a, void* b, simgrid::kernel::activity::CommImpl*)
{
MPI_Request ref = static_cast<MPI_Request>(a);
MPI_Request req = static_cast<MPI_Request>(b);
{
MPI_Request ref = static_cast<MPI_Request>(a);
MPI_Request req = static_cast<MPI_Request>(b);
@@
-131,11
+131,12
@@
int Request::match_recv(void* a, void* b, simgrid::kernel::activity::CommImpl*)
if(req->cancelled_==0)
req->cancelled_ = -1; // mark as uncancelable
XBT_DEBUG("match succeeded");
if(req->cancelled_==0)
req->cancelled_ = -1; // mark as uncancelable
XBT_DEBUG("match succeeded");
- return 1;
- }else return 0;
+ return true;
+ }
+ return false;
}
}
-
int
Request::match_send(void* a, void* b, simgrid::kernel::activity::CommImpl*)
+
bool
Request::match_send(void* a, void* b, simgrid::kernel::activity::CommImpl*)
{
MPI_Request ref = static_cast<MPI_Request>(a);
MPI_Request req = static_cast<MPI_Request>(b);
{
MPI_Request ref = static_cast<MPI_Request>(a);
MPI_Request req = static_cast<MPI_Request>(b);
@@
-157,9
+158,9
@@
int Request::match_send(void* a, void* b, simgrid::kernel::activity::CommImpl*)
if(req->cancelled_==0)
req->cancelled_ = -1; // mark as uncancelable
XBT_DEBUG("match succeeded");
if(req->cancelled_==0)
req->cancelled_ = -1; // mark as uncancelable
XBT_DEBUG("match succeeded");
- return
1
;
- }
else
-
return 0
;
+ return
true
;
+ }
+
return false
;
}
void Request::print_request(const char *message)
}
void Request::print_request(const char *message)