[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2b2-8-g263d5b5

Service Account noreply at mpich.org
Fri Apr 24 16:12:01 CDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".

The branch, master has been updated
       via  263d5b543a2db5ea422cc2750836bc37107c3843 (commit)
      from  2b975462f59dccaea7101ebebf25747c41f3c08a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/263d5b543a2db5ea422cc2750836bc37107c3843

commit 263d5b543a2db5ea422cc2750836bc37107c3843
Author: Pavan Balaji <balaji at anl.gov>
Date:   Thu Apr 23 22:43:47 2015 -0500

    Promote MPL_large_writev/readv return types to ssize_t.
    
    We were originally returning "int" from these functions because the
    idea was that they'd never read/write more than INT_MAX.  However, in
    the case where the upper layer passes an IOV, where the first element
    is smaller than INT_MAX, but the next element is larger than INT_MAX,
    the total number of bytes sent might be larger than INT_MAX.
    
    This was occassionally showing up as an error on Mac OS for large
    message communication.
    
    Signed-off-by: Antonio J. Pena <apenya at mcs.anl.gov>

diff --git a/src/mpl/include/mplsock.h b/src/mpl/include/mplsock.h
index 4759fca..fc4155f 100644
--- a/src/mpl/include/mplsock.h
+++ b/src/mpl/include/mplsock.h
@@ -34,8 +34,8 @@ extern "C" {
 #endif
 /* *INDENT-OFF* */
 
-int MPL_large_writev(int fd, const struct iovec *iov, int iovcnt);
-int MPL_large_readv(int fd, const struct iovec *iov, int iovcnt);
+ssize_t MPL_large_writev(int fd, const struct iovec *iov, int iovcnt);
+ssize_t MPL_large_readv(int fd, const struct iovec *iov, int iovcnt);
 
 /* *INDENT-ON* */
 #if defined(__cplusplus)
diff --git a/src/mpl/src/mplsock.c b/src/mpl/src/mplsock.c
index 087ebd5..4c6cdd5 100644
--- a/src/mpl/src/mplsock.c
+++ b/src/mpl/src/mplsock.c
@@ -16,7 +16,7 @@
  * negligible compared to the system call overhead for small messages
  * and compared to the data transmission overhead for large
  * messages. */
-int MPL_large_writev(int fd, const struct iovec *iov, int iovcnt)
+ssize_t MPL_large_writev(int fd, const struct iovec *iov, int iovcnt)
 {
     ssize_t total_size, tmp;
     struct iovec dummy;
@@ -68,7 +68,7 @@ int MPL_large_writev(int fd, const struct iovec *iov, int iovcnt)
 }
 
 
-int MPL_large_readv(int fd, const struct iovec *iov, int iovcnt)
+ssize_t MPL_large_readv(int fd, const struct iovec *iov, int iovcnt)
 {
     ssize_t total_size, tmp;
     struct iovec dummy;

-----------------------------------------------------------------------

Summary of changes:
 src/mpl/include/mplsock.h |    4 ++--
 src/mpl/src/mplsock.c     |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list