1b031c153b
Correct the spring of the vpid problem (similar to the one in the SM PTL). Add one more argument to the MCA_BTL_SM_FIFO_WRITE macro who will get passed down to the MCA_BTL_SM_SIGNAL_PEER macro to allow it to have the fifo_fd file descriptor. This commit was SVN r7305.
45 строки
1.3 KiB
C
45 строки
1.3 KiB
C
#ifndef MCA_BTL_SM_FIFO_H
|
|
#define MCA_BTL_SM_FIFO_H
|
|
|
|
#include "btl_sm.h"
|
|
#include "btl_sm_endpoint.h"
|
|
|
|
#define MCA_BTL_SM_FIFO_WRITE(endpoint_peer, my_smp_rank,peer_smp_rank,frag,rc) \
|
|
do { \
|
|
ompi_fifo_t* fifo; \
|
|
fifo=&(mca_btl_sm_component.fifo[my_smp_rank][peer_smp_rank]); \
|
|
\
|
|
/* thread lock */ \
|
|
if(opal_using_threads()) \
|
|
opal_atomic_lock(&fifo->head_lock); \
|
|
if(OMPI_CB_FREE == fifo->head) { \
|
|
/* no queues have been allocated - allocate now */ \
|
|
rc=ompi_fifo_init_same_base_addr( \
|
|
mca_btl_sm_component.size_of_cb_queue, \
|
|
mca_btl_sm_component.cb_lazy_free_freq, \
|
|
/* at this stage we are not doing anything with memory \
|
|
* locality */ \
|
|
0,0,0, \
|
|
fifo, mca_btl_sm_component.sm_mpool); \
|
|
if( rc != OMPI_SUCCESS ) { \
|
|
if(opal_using_threads()) \
|
|
opal_atomic_unlock(&(fifo->head_lock)); \
|
|
break; \
|
|
} \
|
|
} \
|
|
\
|
|
/* post fragment */ \
|
|
rc=ompi_fifo_write_to_head_same_base_addr(frag, fifo, \
|
|
mca_btl_sm_component.sm_mpool); \
|
|
if( 0 <= rc ) { \
|
|
MCA_BTL_SM_SIGNAL_PEER(endpoint_peer); \
|
|
rc=OMPI_SUCCESS; \
|
|
} \
|
|
if(opal_using_threads()) \
|
|
opal_atomic_unlock(&fifo->head_lock); \
|
|
} while(0)
|
|
|
|
|
|
#endif
|
|
|