Commit 54af207c authored by Xin Zhao's avatar Xin Zhao
Browse files

Change struct name from MPIDI_Win_lock_queue to MPIDI_RMA_Lock_entry

No reviewer.
parent 886b1d8d
......@@ -19,10 +19,10 @@ MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN(RMA, rma_winlock_getlocallock);
#define FUNCNAME MPIDI_CH3I_Win_lock_entry_alloc
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
static inline MPIDI_Win_lock_queue *MPIDI_CH3I_Win_lock_entry_alloc(MPID_Win * win_ptr,
static inline MPIDI_RMA_Lock_entry *MPIDI_CH3I_Win_lock_entry_alloc(MPID_Win * win_ptr,
MPIDI_CH3_Pkt_t *pkt)
{
MPIDI_Win_lock_queue *new_ptr = NULL;
MPIDI_RMA_Lock_entry *new_ptr = NULL;
if (win_ptr->lock_entry_pool != NULL) {
new_ptr = win_ptr->lock_entry_pool;
......@@ -46,7 +46,7 @@ static inline MPIDI_Win_lock_queue *MPIDI_CH3I_Win_lock_entry_alloc(MPID_Win * w
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
static inline int MPIDI_CH3I_Win_lock_entry_free(MPID_Win * win_ptr,
MPIDI_Win_lock_queue *lock_entry)
MPIDI_RMA_Lock_entry *lock_entry)
{
int mpi_errno = MPI_SUCCESS;
......
......@@ -129,12 +129,12 @@ typedef struct MPIDI_RMA_Win_list {
extern MPIDI_RMA_Win_list_t *MPIDI_RMA_Win_list, *MPIDI_RMA_Win_list_tail;
typedef struct MPIDI_Win_lock_queue {
struct MPIDI_Win_lock_queue *next;
typedef struct MPIDI_RMA_Lock_entry {
struct MPIDI_RMA_Lock_entry *next;
MPIDI_CH3_Pkt_t pkt; /* all information for this request packet */
void *data; /* for queued PUTs / ACCs / GACCs, data is copied here */
int all_data_recved; /* indicate if all data has been received */
} MPIDI_Win_lock_queue;
} MPIDI_RMA_Lock_entry;
typedef MPIDI_RMA_Op_t *MPIDI_RMA_Ops_list_t;
......
......@@ -315,8 +315,8 @@ extern MPIDI_RMA_Pkt_orderings_t *MPIDI_RMA_Pkt_orderings;
volatile int current_lock_type; /* current lock type on this window (as target) \
* (none, shared, exclusive) */ \
volatile int shared_lock_ref_cnt; \
struct MPIDI_Win_lock_queue volatile *lock_queue; /* list of unsatisfied locks */ \
struct MPIDI_Win_lock_queue volatile *lock_queue_tail; /* tail of unstaisfied locks. */ \
struct MPIDI_RMA_Lock_entry volatile *lock_queue; /* list of unsatisfied locks */ \
struct MPIDI_RMA_Lock_entry volatile *lock_queue_tail; /* tail of unstaisfied locks. */ \
\
MPI_Aint *sizes; /* array of sizes of all windows */ \
struct MPIDI_Win_info_args info_args; \
......@@ -350,9 +350,9 @@ extern MPIDI_RMA_Pkt_orderings_t *MPIDI_RMA_Pkt_orderings;
int outstanding_locks; /* when issuing multiple lock requests in \
MPI_WIN_LOCK_ALL, this counter keeps track \
of number of locks not being granted yet. */ \
struct MPIDI_Win_lock_queue *lock_entry_pool_start; \
struct MPIDI_Win_lock_queue *lock_entry_pool; \
struct MPIDI_Win_lock_queue *lock_entry_pool_tail; \
struct MPIDI_RMA_Lock_entry *lock_entry_pool_start; \
struct MPIDI_RMA_Lock_entry *lock_entry_pool; \
struct MPIDI_RMA_Lock_entry *lock_entry_pool_tail; \
#ifdef MPIDI_CH3_WIN_DECL
#define MPID_DEV_WIN_DECL \
......@@ -443,7 +443,7 @@ typedef struct MPIDI_Request {
MPI_Win target_win_handle;
MPI_Win source_win_handle;
MPIDI_CH3_Pkt_flags_t flags; /* flags that were included in the original RMA packet header */
struct MPIDI_Win_lock_queue *lock_queue_entry;
struct MPIDI_RMA_Lock_entry *lock_queue_entry;
MPI_Request resp_request_handle; /* Handle for get_accumulate response */
MPIDI_REQUEST_SEQNUM
......
......@@ -230,7 +230,7 @@ static inline int enqueue_lock_origin(MPID_Win *win_ptr, MPIDI_VC_t *vc,
MPIDI_msg_sz_t *buflen,
MPID_Request **reqp)
{
MPIDI_Win_lock_queue *new_ptr = NULL;
MPIDI_RMA_Lock_entry *new_ptr = NULL;
int mpi_errno = MPI_SUCCESS;
(*reqp) = NULL;
......@@ -382,7 +382,7 @@ static inline int acquire_local_lock(MPID_Win * win_ptr, int lock_type)
/* Queue the lock information. */
MPIDI_CH3_Pkt_t pkt;
MPIDI_CH3_Pkt_lock_t *lock_pkt = &pkt.lock;
MPIDI_Win_lock_queue *new_ptr = NULL;
MPIDI_RMA_Lock_entry *new_ptr = NULL;
MPIDI_Pkt_init(lock_pkt, MPIDI_CH3_PKT_LOCK);
lock_pkt->lock_type = lock_type;
......
......@@ -828,7 +828,7 @@ static int create_derived_datatype(MPID_Request *req, MPID_Datatype **dtp)
}
static inline int perform_put_in_lock_queue(MPID_Win *win_ptr, MPIDI_Win_lock_queue *lock_entry)
static inline int perform_put_in_lock_queue(MPID_Win *win_ptr, MPIDI_RMA_Lock_entry *lock_entry)
{
MPIDI_CH3_Pkt_put_t *put_pkt = &((lock_entry->pkt).put);
MPIDI_VC_t *vc = NULL;
......@@ -860,7 +860,7 @@ static inline int perform_put_in_lock_queue(MPID_Win *win_ptr, MPIDI_Win_lock_qu
goto fn_exit;
}
static inline int perform_get_in_lock_queue(MPID_Win *win_ptr, MPIDI_Win_lock_queue *lock_entry)
static inline int perform_get_in_lock_queue(MPID_Win *win_ptr, MPIDI_RMA_Lock_entry *lock_entry)
{
MPIDI_CH3_Pkt_t upkt;
MPIDI_CH3_Pkt_get_resp_t *get_resp_pkt = &upkt.get_resp;
......@@ -955,7 +955,7 @@ static inline int perform_get_in_lock_queue(MPID_Win *win_ptr, MPIDI_Win_lock_qu
}
static inline int perform_acc_in_lock_queue(MPID_Win *win_ptr, MPIDI_Win_lock_queue *lock_entry)
static inline int perform_acc_in_lock_queue(MPID_Win *win_ptr, MPIDI_RMA_Lock_entry *lock_entry)
{
MPIDI_CH3_Pkt_accum_t *acc_pkt = &((lock_entry->pkt).accum);
MPIDI_VC_t *vc = NULL;
......@@ -995,7 +995,7 @@ static inline int perform_acc_in_lock_queue(MPID_Win *win_ptr, MPIDI_Win_lock_qu
}
static inline int perform_get_acc_in_lock_queue(MPID_Win *win_ptr, MPIDI_Win_lock_queue *lock_entry)
static inline int perform_get_acc_in_lock_queue(MPID_Win *win_ptr, MPIDI_RMA_Lock_entry *lock_entry)
{
MPIDI_CH3_Pkt_t upkt;
MPIDI_CH3_Pkt_get_accum_resp_t *get_accum_resp_pkt = &upkt.get_accum_resp;
......@@ -1126,7 +1126,7 @@ static inline int perform_get_acc_in_lock_queue(MPID_Win *win_ptr, MPIDI_Win_loc
}
static inline int perform_fop_in_lock_queue(MPID_Win *win_ptr, MPIDI_Win_lock_queue *lock_entry)
static inline int perform_fop_in_lock_queue(MPID_Win *win_ptr, MPIDI_RMA_Lock_entry *lock_entry)
{
MPIDI_CH3_Pkt_t upkt;
MPIDI_CH3_Pkt_fop_resp_t *fop_resp_pkt = &upkt.fop_resp;
......@@ -1208,7 +1208,7 @@ static inline int perform_fop_in_lock_queue(MPID_Win *win_ptr, MPIDI_Win_lock_qu
}
static inline int perform_cas_in_lock_queue(MPID_Win *win_ptr, MPIDI_Win_lock_queue *lock_entry)
static inline int perform_cas_in_lock_queue(MPID_Win *win_ptr, MPIDI_RMA_Lock_entry *lock_entry)
{
MPIDI_CH3_Pkt_t upkt;
MPIDI_CH3_Pkt_cas_resp_t *cas_resp_pkt = &upkt.cas_resp;
......@@ -1288,7 +1288,7 @@ static inline int perform_cas_in_lock_queue(MPID_Win *win_ptr, MPIDI_Win_lock_qu
}
static inline int perform_op_in_lock_queue(MPID_Win *win_ptr, MPIDI_Win_lock_queue *lock_entry)
static inline int perform_op_in_lock_queue(MPID_Win *win_ptr, MPIDI_RMA_Lock_entry *lock_entry)
{
int mpi_errno = MPI_SUCCESS;
......@@ -1361,7 +1361,7 @@ static int entered_count = 0;
#define FCNAME MPIDI_QUOTE(FUNCNAME)
int MPIDI_CH3I_Release_lock(MPID_Win *win_ptr)
{
MPIDI_Win_lock_queue *lock_entry, *lock_entry_next;
MPIDI_RMA_Lock_entry *lock_entry, *lock_entry_next;
int requested_lock, mpi_errno = MPI_SUCCESS, temp_entered_count;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_RELEASE_LOCK);
......@@ -1405,7 +1405,7 @@ int MPIDI_CH3I_Release_lock(MPID_Win *win_ptr)
only that one. */
/* FIXME: MT: All queue accesses need to be made atomic */
lock_entry = (MPIDI_Win_lock_queue *) win_ptr->lock_queue;
lock_entry = (MPIDI_RMA_Lock_entry *) win_ptr->lock_queue;
while (lock_entry) {
lock_entry_next = lock_entry->next;
......@@ -1457,7 +1457,7 @@ int MPIDI_CH3_ReqHandler_PiggybackLockOpRecvComplete( MPIDI_VC_t *vc,
int requested_lock;
MPI_Win target_win_handle;
MPID_Win *win_ptr = NULL;
MPIDI_Win_lock_queue *lock_queue_entry = rreq->dev.lock_queue_entry;
MPIDI_RMA_Lock_entry *lock_queue_entry = rreq->dev.lock_queue_entry;
int mpi_errno = MPI_SUCCESS;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_REQHANDLER_PIGGYBACKLOCKOPRECVCOMPLETE);
......
......@@ -387,8 +387,8 @@ static int win_init(MPI_Aint size, int disp_unit, int create_flavor, int model,
/* FIXME: we can optimize by letting the user to pass WIN INFO hint if they will not use passive target,
in such case we do not need to allocate window pool for lock entries. */
MPIU_CHKPMEM_MALLOC((*win_ptr)->lock_entry_pool_start, struct MPIDI_Win_lock_queue *,
sizeof(MPIDI_Win_lock_queue) * MPIR_CVAR_CH3_RMA_LOCK_ENTRY_WIN_POOL_SIZE,
MPIU_CHKPMEM_MALLOC((*win_ptr)->lock_entry_pool_start, struct MPIDI_RMA_Lock_entry *,
sizeof(MPIDI_RMA_Lock_entry) * MPIR_CVAR_CH3_RMA_LOCK_ENTRY_WIN_POOL_SIZE,
mpi_errno, "RMA lock entry pool");
(*win_ptr)->lock_entry_pool = NULL;
(*win_ptr)->lock_entry_pool_tail = NULL;
......
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