Commit 66221968 authored by Xin Zhao's avatar Xin Zhao Committed by Pavan Balaji
Browse files

Move shm_allocated flag from nemesis layer to CH3 layer.



Because CH3 layer needs to know if shared memory region is allocated in lower layer.
Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@mcs.anl.gov>
parent 08273c86
......@@ -18,8 +18,6 @@
typedef pthread_mutex_t MPIDI_CH3I_SHM_MUTEX;
#define MPIDI_CH3_WIN_DECL \
int shm_allocated; /* flag: TRUE iff this window has a shared memory \
region associated with it */ \
void *shm_base_addr; /* base address of shared memory region */ \
MPI_Aint shm_segment_len; /* size of shared memory region */ \
MPIU_SHMW_Hnd_t shm_segment_handle; /* handle to shared memory region */ \
......
......@@ -303,6 +303,8 @@ struct MPIDI_Win_target_state {
all processes remains consistent. */ \
MPID_Group *start_group_ptr; /* group passed in MPI_Win_start */ \
int start_assert; /* assert passed to MPI_Win_start */ \
int shm_allocated; /* flag: TRUE iff this window has a shared memory \
region associated with it */ \
#ifdef MPIDI_CH3_WIN_DECL
#define MPID_DEV_WIN_DECL \
......
......@@ -294,6 +294,7 @@ static int win_init(MPI_Aint size, int disp_unit, int create_flavor, int model,
(*win_ptr)->epoch_state = MPIDI_EPOCH_NONE;
(*win_ptr)->epoch_count = 0;
(*win_ptr)->at_rma_ops_list = NULL;
(*win_ptr)->shm_allocated = FALSE;
/* Initialize the passive target lock state */
MPIU_CHKPMEM_MALLOC((*win_ptr)->targets, struct MPIDI_Win_target_state *,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment