more corrections to ping
This commit was SVN r5765.
Этот коммит содержится в:
родитель
f64bcf3a52
Коммит
95f4def89a
@ -341,11 +341,14 @@ static int mca_oob_tcp_create_listen(void)
|
|||||||
*/
|
*/
|
||||||
static void mca_oob_tcp_recv_probe(int sd, mca_oob_tcp_hdr_t* hdr)
|
static void mca_oob_tcp_recv_probe(int sd, mca_oob_tcp_hdr_t* hdr)
|
||||||
{
|
{
|
||||||
unsigned char* ptr = (unsigned char*)&hdr;
|
unsigned char* ptr = (unsigned char*)hdr;
|
||||||
size_t cnt = 0;
|
size_t cnt = 0;
|
||||||
|
|
||||||
|
hdr->msg_type = MCA_OOB_TCP_PROBE;
|
||||||
hdr->msg_dst = hdr->msg_src;
|
hdr->msg_dst = hdr->msg_src;
|
||||||
hdr->msg_src = *orte_process_info.my_name;
|
hdr->msg_src = *orte_process_info.my_name;
|
||||||
|
MCA_OOB_TCP_HDR_HTON(hdr);
|
||||||
|
|
||||||
while(cnt < sizeof(mca_oob_tcp_hdr_t)) {
|
while(cnt < sizeof(mca_oob_tcp_hdr_t)) {
|
||||||
int retval = send(sd, (char *)ptr+cnt, sizeof(mca_oob_tcp_hdr_t)-cnt, 0);
|
int retval = send(sd, (char *)ptr+cnt, sizeof(mca_oob_tcp_hdr_t)-cnt, 0);
|
||||||
if(retval < 0) {
|
if(retval < 0) {
|
||||||
|
@ -259,11 +259,15 @@ int mca_oob_tcp_recv_cancel(
|
|||||||
|
|
||||||
/* wait for any previously matched messages to be processed */
|
/* wait for any previously matched messages to be processed */
|
||||||
OMPI_THREAD_LOCK(&mca_oob_tcp_component.tcp_match_lock);
|
OMPI_THREAD_LOCK(&mca_oob_tcp_component.tcp_match_lock);
|
||||||
|
#if OMPI_ENABLE_PROGRESS_THREADS
|
||||||
|
if(ompi_progress_thread() == false) {
|
||||||
while(mca_oob_tcp_component.tcp_match_count) {
|
while(mca_oob_tcp_component.tcp_match_count) {
|
||||||
ompi_condition_wait(
|
ompi_condition_wait(
|
||||||
&mca_oob_tcp_component.tcp_match_cond,
|
&mca_oob_tcp_component.tcp_match_cond,
|
||||||
&mca_oob_tcp_component.tcp_match_lock);
|
&mca_oob_tcp_component.tcp_match_lock);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* remove any matching posted receives */
|
/* remove any matching posted receives */
|
||||||
for(item = ompi_list_get_first(&mca_oob_tcp_component.tcp_msg_post);
|
for(item = ompi_list_get_first(&mca_oob_tcp_component.tcp_msg_post);
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user