@@ -62,7 +62,7 @@ typedef struct mca_btl_base_endpoint_t {
6262
6363 int32_t peer_smp_rank ; /**< my peer's SMP process rank. Used for accessing
6464 * SMP specfic data structures. */
65- uint32_t send_count ; /**< number of fragments sent to this peer */
65+ volatile uint64_t send_count ; /**< number of fragments sent to this peer */
6666 char * segment_base ; /**< start of the peer's segment (in the address space
6767 * of this process) */
6868
@@ -84,6 +84,7 @@ typedef struct mca_btl_base_endpoint_t {
8484 } other ;
8585 } segment_data ;
8686
87+ opal_mutex_t pending_frags_lock ; /**< protect pending_frags */
8788 opal_list_t pending_frags ; /**< fragments pending fast box space */
8889 bool waiting ; /**< endpoint is on the component wait list */
8990} mca_btl_base_endpoint_t ;
@@ -94,15 +95,15 @@ OBJ_CLASS_DECLARATION(mca_btl_vader_endpoint_t);
9495
9596static inline void mca_btl_vader_endpoint_setup_fbox_recv (struct mca_btl_base_endpoint_t * endpoint , void * base )
9697{
97- endpoint -> fbox_in .buffer = base ;
9898 endpoint -> fbox_in .startp = (uint32_t * ) base ;
9999 endpoint -> fbox_in .start = MCA_BTL_VADER_FBOX_ALIGNMENT ;
100100 endpoint -> fbox_in .seq = 0 ;
101+ opal_atomic_wmb ();
102+ endpoint -> fbox_in .buffer = base ;
101103}
102104
103105static inline void mca_btl_vader_endpoint_setup_fbox_send (struct mca_btl_base_endpoint_t * endpoint , void * base )
104106{
105- endpoint -> fbox_out .buffer = base ;
106107 endpoint -> fbox_out .start = MCA_BTL_VADER_FBOX_ALIGNMENT ;
107108 endpoint -> fbox_out .end = MCA_BTL_VADER_FBOX_ALIGNMENT ;
108109 endpoint -> fbox_out .startp = (uint32_t * ) base ;
@@ -111,6 +112,9 @@ static inline void mca_btl_vader_endpoint_setup_fbox_send (struct mca_btl_base_e
111112
112113 /* zero out the first header in the fast box */
113114 memset ((char * ) base + MCA_BTL_VADER_FBOX_ALIGNMENT , 0 , MCA_BTL_VADER_FBOX_ALIGNMENT );
115+
116+ opal_atomic_wmb ();
117+ endpoint -> fbox_out .buffer = base ;
114118}
115119
116120#endif /* MCA_BTL_VADER_ENDPOINT_H */
0 commit comments