add missing thread lock/unlock around condition_broadcast
This commit was SVN r24885.
Этот коммит содержится в:
родитель
c3ec2e2614
Коммит
3f4e5d7dd6
@ -1,3 +1,4 @@
|
|||||||
|
/* -*- Mode: C; c-basic-offset:4 ; -*- */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2011 The University of Tennessee and The University
|
* Copyright (c) 2004-2011 The University of Tennessee and The University
|
||||||
* of Tennessee Research Foundation. All rights
|
* of Tennessee Research Foundation. All rights
|
||||||
@ -41,10 +42,12 @@ orte_rml_recv_msg_callback(int status,
|
|||||||
hdr->tag));
|
hdr->tag));
|
||||||
|
|
||||||
if (msg->msg_type == ORTE_RML_BLOCKING_RECV) {
|
if (msg->msg_type == ORTE_RML_BLOCKING_RECV) {
|
||||||
|
OPAL_THREAD_LOCK(&msg->msg_lock);
|
||||||
/* blocking send */
|
/* blocking send */
|
||||||
msg->msg_status = status;
|
msg->msg_status = status;
|
||||||
msg->msg_complete = true;
|
msg->msg_complete = true;
|
||||||
opal_condition_broadcast(&msg->msg_cond);
|
opal_condition_broadcast(&msg->msg_cond);
|
||||||
|
OPAL_THREAD_UNLOCK(&msg->msg_lock);
|
||||||
} else if (msg->msg_type == ORTE_RML_NONBLOCKING_IOV_RECV) {
|
} else if (msg->msg_type == ORTE_RML_NONBLOCKING_IOV_RECV) {
|
||||||
/* non-blocking iovec send */
|
/* non-blocking iovec send */
|
||||||
if (status > 0) {
|
if (status > 0) {
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
/* -*- Mode: C; c-basic-offset:4 ; -*- */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||||
* University Research and Technology
|
* University Research and Technology
|
||||||
@ -44,6 +45,7 @@ orte_rml_send_msg_callback(int status,
|
|||||||
(orte_rml_oob_msg_header_t*) iov[0].iov_base;
|
(orte_rml_oob_msg_header_t*) iov[0].iov_base;
|
||||||
|
|
||||||
if (msg->msg_type == ORTE_RML_BLOCKING_SEND) {
|
if (msg->msg_type == ORTE_RML_BLOCKING_SEND) {
|
||||||
|
OPAL_THREAD_LOCK(&msg->msg_lock);
|
||||||
/* blocking send */
|
/* blocking send */
|
||||||
if (status > 0) {
|
if (status > 0) {
|
||||||
msg->msg_status = status - sizeof(orte_rml_oob_msg_header_t);
|
msg->msg_status = status - sizeof(orte_rml_oob_msg_header_t);
|
||||||
@ -52,6 +54,7 @@ orte_rml_send_msg_callback(int status,
|
|||||||
}
|
}
|
||||||
msg->msg_complete = true;
|
msg->msg_complete = true;
|
||||||
opal_condition_broadcast(&msg->msg_cond);
|
opal_condition_broadcast(&msg->msg_cond);
|
||||||
|
OPAL_THREAD_UNLOCK(&msg->msg_lock);
|
||||||
} else if (msg->msg_type == ORTE_RML_NONBLOCKING_IOV_SEND) {
|
} else if (msg->msg_type == ORTE_RML_NONBLOCKING_IOV_SEND) {
|
||||||
/* non-blocking iovec send */
|
/* non-blocking iovec send */
|
||||||
if (status > 0) {
|
if (status > 0) {
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user