Guest User

Untitled

a guest
May 21st, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 4.26 KB | None | 0 0
  1. Index: src/util/wrappers/mpiu_shm_wrappers.h
  2. ===================================================================
  3. --- src/util/wrappers/mpiu_shm_wrappers.h   (revision 9448)
  4. +++ src/util/wrappers/mpiu_shm_wrappers.h   (working copy)
  5. @@ -250,7 +250,7 @@ static inline void MPIU_SHMW_Hnd_free(MPIU_SHMW_Hn
  6.      }
  7.  }
  8.  
  9. -static inline int MPIU_SHMW_Seg_open(MPIU_SHMW_Hnd_t hnd, int seg_sz);
  10. +static inline int MPIU_SHMW_Seg_open(MPIU_SHMW_Hnd_t hnd, MPIU_Size_t seg_sz);
  11.  static inline int MPIU_SHMW_Hnd_deserialize_by_ref(MPIU_SHMW_Hnd_t hnd, char **ser_hnd_ptr);
  12.  
  13.  /* FIXME : Don't print ENGLISH strings on error. Define the error
  14. @@ -457,7 +457,7 @@ static inline int MPIU_SHMW_Hnd_finalize(
  15.  #undef FCNAME
  16.  #define FCNAME MPIU_QUOTE(FUNCNAME)
  17.  static inline int MPIU_SHMW_Seg_create_attach_templ(
  18. -    MPIU_SHMW_Hnd_t hnd, int seg_sz, char **shm_addr_ptr,
  19. +    MPIU_SHMW_Hnd_t hnd, MPIU_Size_t seg_sz, char **shm_addr_ptr,
  20.      int offset, int flag)
  21.  {
  22.      int mpi_errno = MPI_SUCCESS;
  23. @@ -522,7 +522,7 @@ fn_fail:
  24.  #undef FCNAME
  25.  #define FCNAME MPIU_QUOTE(FUNCNAME)
  26.  static inline int MPIU_SHMW_Seg_detach(
  27. -    MPIU_SHMW_Hnd_t hnd, char **shm_addr_ptr, int seg_sz)
  28. +    MPIU_SHMW_Hnd_t hnd, char **shm_addr_ptr, MPIU_Size_t seg_sz)
  29.  {
  30.      int mpi_errno = MPI_SUCCESS;
  31.      int rc = -1;
  32. @@ -588,7 +588,7 @@ fn_fail:
  33.  #undef FCNAME
  34.  #define FCNAME MPIU_QUOTE(FUNCNAME)
  35.  static inline int MPIU_SHMW_Seg_create_attach_templ(
  36. -    MPIU_SHMW_Hnd_t hnd, int seg_sz, char **shm_addr_ptr,
  37. +    MPIU_SHMW_Hnd_t hnd, MPIU_Size_t seg_sz, char **shm_addr_ptr,
  38.      int offset, int flag)
  39.  {
  40.      int mpi_errno = MPI_SUCCESS;
  41. @@ -672,7 +672,7 @@ fn_fail:
  42.  #undef FCNAME
  43.  #define FCNAME MPIU_QUOTE(FUNCNAME)
  44.  static inline int MPIU_SHMW_Seg_detach(
  45. -    MPIU_SHMW_Hnd_t hnd, char **shm_addr_ptr, int seg_sz)
  46. +    MPIU_SHMW_Hnd_t hnd, char **shm_addr_ptr, MPIU_Size_t seg_sz)
  47.  {
  48.      int mpi_errno = MPI_SUCCESS;
  49.      int rc = -1;
  50. @@ -722,12 +722,14 @@ fn_fail:
  51.  #undef FCNAME
  52.  #define FCNAME MPIU_QUOTE(FUNCNAME)
  53.  static inline int MPIU_SHMW_Seg_create_attach_templ(
  54. -    MPIU_SHMW_Hnd_t hnd, int seg_sz, char **shm_addr_ptr,
  55. +    MPIU_SHMW_Hnd_t hnd, MPIU_Size_t seg_sz, char **shm_addr_ptr,
  56.      int offset, int flag)
  57.  {
  58.      int mpi_errno = MPI_SUCCESS;
  59.      HANDLE lhnd = INVALID_HANDLE_VALUE;
  60.      int rc = -1;
  61. +    ULARGE_INTEGER seg_sz_large;
  62. +    seg_sz_large.QuadPart = seg_sz;
  63.  
  64.      if(!MPIU_SHMW_Ghnd_is_valid(hnd)){
  65.          MPIU_Assert(flag & MPIU_SHMW_FLAG_SHM_CREATE);
  66. @@ -739,7 +741,7 @@ static inline int MPIU_SHMW_Seg_create_attach_temp
  67.  
  68.      if(flag & MPIU_SHMW_FLAG_SHM_CREATE){
  69.          lhnd = CreateFileMapping(INVALID_HANDLE_VALUE, NULL,
  70. -                PAGE_READWRITE, 0, seg_sz,
  71. +                PAGE_READWRITE, seg_sz_large.HighPart, seg_sz_large.LowPart,
  72.                  MPIU_SHMW_Ghnd_get_by_ref(hnd));
  73.          /* Return error if SHM seg already exists or create fails */
  74.          MPIU_ERR_CHKANDJUMP2((lhnd == INVALID_HANDLE_VALUE) ||
  75. @@ -788,7 +790,7 @@ fn_fail:
  76.  #undef FCNAME
  77.  #define FCNAME MPIU_QUOTE(FUNCNAME)
  78.  static inline int MPIU_SHMW_Seg_detach(
  79. -    MPIU_SHMW_Hnd_t hnd, char **shm_addr_ptr, int seg_sz)
  80. +    MPIU_SHMW_Hnd_t hnd, char **shm_addr_ptr, MPIU_Size_t seg_sz)
  81.  {
  82.      int mpi_errno = MPI_SUCCESS;
  83.      int rc = -1;
  84. @@ -825,7 +827,7 @@ fn_fail:
  85.  #undef FCNAME
  86.  #define FCNAME MPIU_QUOTE(FUNCNAME)
  87.  static inline int MPIU_SHMW_Seg_create(
  88. -    MPIU_SHMW_Hnd_t hnd, int seg_sz)
  89. +    MPIU_SHMW_Hnd_t hnd, MPIU_Size_t seg_sz)
  90.  {
  91.      int mpi_errno = MPI_SUCCESS;
  92.  
  93. @@ -852,7 +854,7 @@ fn_fail:
  94.  #undef FCNAME
  95.  #define FCNAME MPIU_QUOTE(FUNCNAME)
  96.  static inline int MPIU_SHMW_Seg_open(
  97. -    MPIU_SHMW_Hnd_t hnd, int seg_sz)
  98. +    MPIU_SHMW_Hnd_t hnd, MPIU_Size_t seg_sz)
  99.  {
  100.      int mpi_errno = MPI_SUCCESS;
  101.  
  102. @@ -880,7 +882,7 @@ fn_fail:
  103.  #undef FCNAME
  104.  #define FCNAME MPIU_QUOTE(FUNCNAME)
  105.  static inline int MPIU_SHMW_Seg_create_and_attach(
  106. -    MPIU_SHMW_Hnd_t hnd, int seg_sz, char **shm_addr_ptr,
  107. +    MPIU_SHMW_Hnd_t hnd, MPIU_Size_t seg_sz, char **shm_addr_ptr,
  108.      int offset)
  109.  {
  110.      int mpi_errno = MPI_SUCCESS;
  111. @@ -912,7 +914,7 @@ fn_fail:
  112.  #undef FCNAME
  113.  #define FCNAME MPIU_QUOTE(FUNCNAME)
  114.  static inline int MPIU_SHMW_Seg_attach(
  115. -    MPIU_SHMW_Hnd_t hnd, int seg_sz, char **shm_addr_ptr,
  116. +    MPIU_SHMW_Hnd_t hnd, MPIU_Size_t seg_sz, char **shm_addr_ptr,
  117.      int offset)
  118.  {
  119.      int mpi_errno = MPI_SUCCESS;
Add Comment
Please, Sign In to add comment