1 #ifndef MCA_BTL_SMCUDA_FIFO_H
2 #define MCA_BTL_SMCUDA_FIFO_H
13 OPAL_FREE_LIST_GET(&mca_btl_smcuda_component.pending_send_fl, i, rc);
16 assert(i != NULL && rc == OMPI_SUCCESS);
60 #define FIFO_MAP(x) ((x) & (mca_btl_smcuda_component.nfifos - 1))
61 #define FIFO_MAP_NUM(n) ( (mca_btl_smcuda_component.nfifos) < (n) ? (mca_btl_smcuda_component.nfifos) : (n) )
64 #define MCA_BTL_SMCUDA_FIFO_WRITE(endpoint_peer, my_smp_rank, \
65 peer_smp_rank, hdr, resend, retry_pending_sends, rc) \
67 sm_fifo_t* fifo = &(mca_btl_smcuda_component.fifo[peer_smp_rank][FIFO_MAP(my_smp_rank)]); \
69 if ( retry_pending_sends ) { \
70 if ( 0 < opal_list_get_size(&endpoint_peer->pending_sends) ) { \
71 btl_smcuda_process_pending_sends(endpoint_peer); \
75 opal_atomic_lock(&(fifo->head_lock)); \
77 if(sm_fifo_write(hdr, fifo) != OMPI_SUCCESS) { \
78 add_pending(endpoint_peer, hdr, resend); \
79 rc = OMPI_ERR_RESOURCE_BUSY; \
81 MCA_BTL_SMCUDA_SIGNAL_PEER(endpoint_peer); \
84 opal_atomic_unlock(&(fifo->head_lock)); \
#define OPAL_THREAD_ADD32(x, y)
Use an atomic operation for increment/decrement if opal_using_threads() indicates that threads are in...
Definition: mutex.h:367
Definition: opal_list.h:98
#define OPAL_THREAD_LOCK(mutex)
Lock a mutex if opal_using_threads() says that multiple threads may be active in the process...
Definition: mutex.h:223
opal_mutex_t endpoint_lock
lock for concurrent access to endpoint state
Definition: btl_openib_endpoint.h:198
#define OPAL_THREAD_UNLOCK(mutex)
Unlock a mutex if opal_using_threads() says that multiple threads may be active in the process...
Definition: mutex.h:309
Definition: opal_free_list.h:47
Definition: btl_smcuda.h:214
#define opal_list_append(l, i)
Append an item to the end of the list.
Definition: opal_list.h:410
int num_pending_sends
total number on all of my pending-send queues
Definition: btl_smcuda.h:164
State of ELAN endpoint connection.
Definition: btl_elan_endpoint.h:33
static void opal_list_prepend(opal_list_t *list, opal_list_item_t *item)
Prepend an item to the beginning of the list.
Definition: opal_list.h:469
opal_list_t pending_sends
pending data to send
Definition: btl_sm_endpoint.h:39