Commit 5fd735b8 authored by Xin Zhao's avatar Xin Zhao Committed by Rob Latham
Browse files

Delete redundant enum values for lock types.



For lock type, we only need one internal value
to specify cases when currently there is no passive
lock issued from origin side or there is no passive
lock imposed on target side. If there are passive
locks, we directly use MPI_LOCK_SHARED and
MPI_LOCK_EXCLUSIVE to indicate the lock type. This
patch deletes redundant enum for lock types and just
defines MPID_LOCK_NONE.
Signed-off-by: Rob Latham's avatarRob Latham <robl@mcs.anl.gov>
parent 57b64dad
......@@ -113,7 +113,7 @@ static inline MPIDI_RMA_Target_t *MPIDI_CH3I_Win_target_alloc(MPID_Win * win_ptr
e->target_rank = -1;
e->access_state = MPIDI_RMA_NONE;
e->lock_type = MPIDI_RMA_LOCK_TYPE_NONE;
e->lock_type = MPID_LOCK_NONE;
e->lock_mode = 0;
e->outstanding_lock = 0;
e->disable_flush_local = 0;
......
......@@ -16,22 +16,7 @@ enum MPIDI_RMA_Datatype {
MPIDI_RMA_DATATYPE_DERIVED = 51
};
/* We start with an arbitrarily chosen number (60), to help with
* debugging when a lock state is not initialized or wrongly
* initialized. */
enum MPID_Lock_state {
MPID_LOCK_NONE = 60,
MPID_LOCK_SHARED_ALL
};
/* We start with an arbitrarily chosen number (23), to help with
* debugging when a lock type is not initialized or wrongly
* initialized. */
enum MPIDI_RMA_Lock_type {
MPIDI_RMA_LOCK_TYPE_NONE = 23,
MPIDI_RMA_LOCK_TYPE_SHARED,
MPIDI_RMA_LOCK_TYPE_EXCLUSIVE
};
#define MPID_LOCK_NONE 60
/*
* RMA Declarations. We should move these into something separate from
......@@ -98,7 +83,7 @@ typedef struct MPIDI_RMA_Target {
struct MPIDI_RMA_Target *next;
int target_rank;
enum MPIDI_RMA_states access_state;
enum MPIDI_RMA_Lock_type lock_type; /* SHARED, EXCLUSIVE */
int lock_type; /* NONE, SHARED, EXCLUSIVE */
int lock_mode; /* e.g., MODE_NO_CHECK */
int outstanding_lock;
int disable_flush_local;
......
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