Two minor usnic fixes
* clang warning stomp * memory barrier for volatile variable use These can go to 1.7.5 or can slip to v1.8 -- RM decision. Submitted by Jeff Squyres, reviewed by Dave Goodell cmr=v1.7.5:reviewer=ompi-rm1.7 This commit was SVN r30944.
Этот коммит содержится в:
родитель
361f15d5d7
Коммит
554303af08
@ -62,6 +62,7 @@ static void client_rml_receive(int status, ompi_process_name_t* sender,
|
|||||||
UNPACK_UINT32(buffer, cddr->udp_port);
|
UNPACK_UINT32(buffer, cddr->udp_port);
|
||||||
|
|
||||||
/* Tell the main thread that the reply is done */
|
/* Tell the main thread that the reply is done */
|
||||||
|
opal_atomic_mb();
|
||||||
cddr->receive_done = true;
|
cddr->receive_done = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,6 +151,7 @@ int ompi_btl_usnic_connectivity_listen(ompi_btl_usnic_module_t *module)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Get the UDP port number that was received */
|
/* Get the UDP port number that was received */
|
||||||
|
opal_atomic_mb();
|
||||||
module->local_addr.connectivity_udp_port = data.udp_port;
|
module->local_addr.connectivity_udp_port = data.udp_port;
|
||||||
|
|
||||||
return OMPI_SUCCESS;
|
return OMPI_SUCCESS;
|
||||||
|
@ -157,11 +157,16 @@ struct ompi_btl_usnic_module_t;
|
|||||||
*
|
*
|
||||||
* Note that this macro will call ompi_btl_usnic_util_abort() if an error
|
* Note that this macro will call ompi_btl_usnic_util_abort() if an error
|
||||||
* occurs.
|
* occurs.
|
||||||
|
*
|
||||||
|
* Also note that we use a temp variable of the correct type because
|
||||||
|
* some of the values passed in to this macro are volatile, and the
|
||||||
|
* call to opal_dss.unpack() will discard that volatile qualifier.
|
||||||
*/
|
*/
|
||||||
#define UNPACK(buffer, type, opal_unpack_type, value) \
|
#define UNPACK(buffer, type, opal_unpack_type, value) \
|
||||||
do { \
|
do { \
|
||||||
int ret_value, n = 1; \
|
int ret_value, n = 1; \
|
||||||
type temp; \
|
type temp; \
|
||||||
|
value = (type) 0; \
|
||||||
ret_value = opal_dss.unpack((buffer), &temp, &n, opal_unpack_type); \
|
ret_value = opal_dss.unpack((buffer), &temp, &n, opal_unpack_type); \
|
||||||
if (OPAL_SUCCESS != ret_value) { \
|
if (OPAL_SUCCESS != ret_value) { \
|
||||||
OMPI_ERROR_LOG(ret_value); \
|
OMPI_ERROR_LOG(ret_value); \
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user