1
1
openmpi/ompi/mca/btl/sm/btl_sm_fifo.h
Rainer Keller a3b30749b0 - Only lock/unlock when using threads.
Basically revert this part of r16015.

This commit was SVN r16029.

The following SVN revision numbers were found above:
  r16015 --> open-mpi/ompi@435e7d80e9
2007-08-31 12:34:48 +00:00

25 строки
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,hdr) \
do { \
ompi_fifo_t* fifo; \
fifo=&(mca_btl_sm_component.fifo[peer_smp_rank][my_smp_rank]); \
\
/* thread lock */ \
if(opal_using_threads()) \
opal_atomic_lock(fifo->head_lock); \
/* post fragment */ \
while(ompi_fifo_write_to_head(hdr, fifo, \
mca_btl_sm_component.sm_mpool) != OMPI_SUCCESS) \
opal_progress(); \
MCA_BTL_SM_SIGNAL_PEER(endpoint_peer); \
if(opal_using_threads()) \
opal_atomic_unlock(fifo->head_lock); \
} while(0)
#endif