* fix some silly commenting done by a previous developer that are good for
a laugh but probably not good for usability ;) This commit was SVN r9253.
Этот коммит содержится в:
родитель
eafdfba0d4
Коммит
3e2c51dea8
@ -14,9 +14,15 @@
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*
|
||||
* In windows, many of the socket functions return an EWOULDBLOCK
|
||||
* instead of \ things like EAGAIN, EINPROGRESS, etc. It has been
|
||||
* verified that this will \ not conflict with other error codes that
|
||||
* are returned by these functions \ under UNIX/Linux environments
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "orte/orte_socket_errno.h"
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
@ -60,13 +66,6 @@
|
||||
#include "ompi/datatype/convertor.h"
|
||||
|
||||
|
||||
#define IMPORTANT_WINDOWS_COMMENT() \
|
||||
/* In windows, many of the socket functions return an EWOULDBLOCK instead of \
|
||||
things like EAGAIN, EINPROGRESS, etc. It has been verified that this will \
|
||||
not conflict with other error codes that are returned by these functions \
|
||||
under UNIX/Linux environments */
|
||||
|
||||
|
||||
mca_btl_tcp_component_t mca_btl_tcp_component = {
|
||||
{
|
||||
/* First, the mca_base_component_t struct containing meta information
|
||||
@ -557,7 +556,6 @@ static void mca_btl_tcp_component_accept(void)
|
||||
mca_btl_tcp_event_t *event;
|
||||
int sd = accept(mca_btl_tcp_component.tcp_listen_sd, (struct sockaddr*)&addr, &addrlen);
|
||||
if(sd < 0) {
|
||||
IMPORTANT_WINDOWS_COMMENT();
|
||||
if(ompi_socket_errno == EINTR)
|
||||
continue;
|
||||
if(ompi_socket_errno != EAGAIN || ompi_socket_errno != EWOULDBLOCK)
|
||||
|
@ -14,10 +14,15 @@
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*
|
||||
* In windows, many of the socket functions return an EWOULDBLOCK
|
||||
* instead of \ things like EAGAIN, EINPROGRESS, etc. It has been
|
||||
* verified that this will \ not conflict with other error codes that
|
||||
* are returned by these functions \ under UNIX/Linux environments
|
||||
*/
|
||||
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
@ -45,6 +50,7 @@
|
||||
#ifdef HAVE_TIME_H
|
||||
#include <time.h>
|
||||
#endif /* HAVE_TIME_H */
|
||||
|
||||
#include "ompi/types.h"
|
||||
#include "ompi/mca/btl/base/btl_base_error.h"
|
||||
#include "btl_tcp.h"
|
||||
@ -104,12 +110,6 @@ OBJ_CLASS_INSTANCE(
|
||||
mca_btl_tcp_endpoint_destruct);
|
||||
|
||||
|
||||
#define IMPORTANT_WINDOWS_COMMENT() \
|
||||
/* In windows, many of the socket functions return an EWOULDBLOCK instead of \
|
||||
things like EAGAIN, EINPROGRESS, etc. It has been verified that this will \
|
||||
not conflict with other error codes that are returned by these functions \
|
||||
under UNIX/Linux environments */
|
||||
|
||||
static void mca_btl_tcp_endpoint_construct(mca_btl_base_endpoint_t* btl_endpoint);
|
||||
static void mca_btl_tcp_endpoint_destruct(mca_btl_base_endpoint_t* btl_endpoint);
|
||||
static int mca_btl_tcp_endpoint_start_connect(mca_btl_base_endpoint_t*);
|
||||
@ -254,7 +254,6 @@ static int mca_btl_tcp_endpoint_send_blocking(mca_btl_base_endpoint_t* btl_endpo
|
||||
while(cnt < size) {
|
||||
int retval = send(btl_endpoint->endpoint_sd, (const char *)ptr+cnt, size-cnt, 0);
|
||||
if(retval < 0) {
|
||||
IMPORTANT_WINDOWS_COMMENT();
|
||||
if(ompi_socket_errno != EINTR && ompi_socket_errno != EAGAIN && ompi_socket_errno != EWOULDBLOCK) {
|
||||
BTL_ERROR(("send() failed with errno=%d",ompi_socket_errno));
|
||||
mca_btl_tcp_endpoint_close(btl_endpoint);
|
||||
@ -412,7 +411,6 @@ static int mca_btl_tcp_endpoint_recv_blocking(mca_btl_base_endpoint_t* btl_endpo
|
||||
|
||||
/* socket is non-blocking so handle errors */
|
||||
if(retval < 0) {
|
||||
IMPORTANT_WINDOWS_COMMENT();
|
||||
if(ompi_socket_errno != EINTR && ompi_socket_errno != EAGAIN && ompi_socket_errno != EWOULDBLOCK) {
|
||||
BTL_ERROR(("recv() failed with errno=%d",ompi_socket_errno));
|
||||
mca_btl_tcp_endpoint_close(btl_endpoint);
|
||||
@ -525,7 +523,6 @@ static int mca_btl_tcp_endpoint_start_connect(mca_btl_base_endpoint_t* btl_endpo
|
||||
endpoint_addr.sin_port = btl_endpoint->endpoint_addr->addr_port;
|
||||
if(connect(btl_endpoint->endpoint_sd, (struct sockaddr*)&endpoint_addr, sizeof(endpoint_addr)) < 0) {
|
||||
/* non-blocking so wait for completion */
|
||||
IMPORTANT_WINDOWS_COMMENT();
|
||||
if(ompi_socket_errno == EINPROGRESS || ompi_socket_errno == EWOULDBLOCK) {
|
||||
btl_endpoint->endpoint_state = MCA_BTL_TCP_CONNECTING;
|
||||
opal_event_add(&btl_endpoint->endpoint_send_event, 0);
|
||||
@ -567,7 +564,6 @@ static void mca_btl_tcp_endpoint_complete_connect(mca_btl_base_endpoint_t* btl_e
|
||||
mca_btl_tcp_endpoint_close(btl_endpoint);
|
||||
return;
|
||||
}
|
||||
IMPORTANT_WINDOWS_COMMENT();
|
||||
if(so_error == EINPROGRESS || so_error == EWOULDBLOCK) {
|
||||
opal_event_add(&btl_endpoint->endpoint_send_event, 0);
|
||||
return;
|
||||
|
@ -1,3 +1,26 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*
|
||||
* In windows, many of the socket functions return an EWOULDBLOCK
|
||||
* instead of \ things like EAGAIN, EINPROGRESS, etc. It has been
|
||||
* verified that this will \ not conflict with other error codes that
|
||||
* are returned by these functions \ under UNIX/Linux environments
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
|
@ -14,6 +14,11 @@
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*
|
||||
* In windows, many of the socket functions return an EWOULDBLOCK
|
||||
* instead of \ things like EAGAIN, EINPROGRESS, etc. It has been
|
||||
* verified that this will \ not conflict with other error codes that
|
||||
* are returned by these functions \ under UNIX/Linux environments
|
||||
*/
|
||||
|
||||
#include "orte_config.h"
|
||||
@ -43,12 +48,6 @@
|
||||
#include "orte/mca/gpr/gpr.h"
|
||||
#include "ompi/constants.h"
|
||||
|
||||
#define IMPORTANT_WINDOWS_COMMENT() \
|
||||
/* In windows, many of the socket functions return an EWOULDBLOCK instead of \
|
||||
things like EAGAIN, EINPROGRESS, etc. It has been verified that this will \
|
||||
not conflict with other error codes that are returned by these functions \
|
||||
under UNIX/Linux environments */
|
||||
|
||||
/*
|
||||
* Data structure for accepting connections.
|
||||
*/
|
||||
@ -259,7 +258,6 @@ static void mca_oob_tcp_accept(void)
|
||||
|
||||
sd = accept(mca_oob_tcp_component.tcp_listen_sd, (struct sockaddr*)&addr, &addrlen);
|
||||
if(sd < 0) {
|
||||
IMPORTANT_WINDOWS_COMMENT();
|
||||
if(ompi_socket_errno == EINTR)
|
||||
continue;
|
||||
if(ompi_socket_errno != EAGAIN || ompi_socket_errno != EWOULDBLOCK)
|
||||
@ -370,7 +368,6 @@ static void mca_oob_tcp_recv_probe(int sd, mca_oob_tcp_hdr_t* hdr)
|
||||
while(cnt < sizeof(mca_oob_tcp_hdr_t)) {
|
||||
int retval = send(sd, (char *)ptr+cnt, sizeof(mca_oob_tcp_hdr_t)-cnt, 0);
|
||||
if(retval < 0) {
|
||||
IMPORTANT_WINDOWS_COMMENT();
|
||||
if(ompi_socket_errno != EINTR && ompi_socket_errno != EAGAIN && ompi_socket_errno != EWOULDBLOCK) {
|
||||
opal_output(0, "[%lu,%lu,%lu]-[%lu,%lu,%lu] mca_oob_tcp_peer_recv_probe: send() failed with errno=%d\n",
|
||||
ORTE_NAME_ARGS(orte_process_info.my_name),
|
||||
|
@ -14,7 +14,13 @@
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*
|
||||
* In windows, many of the socket functions return an EWOULDBLOCK
|
||||
* instead of \ things like EAGAIN, EINPROGRESS, etc. It has been
|
||||
* verified that this will \ not conflict with other error codes that
|
||||
* are returned by these functions \ under UNIX/Linux environments
|
||||
*/
|
||||
|
||||
#include "orte_config.h"
|
||||
#include "orte/orte_socket_errno.h"
|
||||
|
||||
|
@ -14,7 +14,13 @@
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*
|
||||
* In windows, many of the socket functions return an EWOULDBLOCK
|
||||
* instead of \ things like EAGAIN, EINPROGRESS, etc. It has been
|
||||
* verified that this will \ not conflict with other error codes that
|
||||
* are returned by these functions \ under UNIX/Linux environments
|
||||
*/
|
||||
|
||||
#include "orte_config.h"
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
@ -48,12 +54,6 @@
|
||||
#include "oob_tcp.h"
|
||||
#include "oob_tcp_peer.h"
|
||||
|
||||
#define IMPORTANT_WINDOWS_COMMENT() \
|
||||
/* In windows, many of the socket functions return an EWOULDBLOCK instead of \
|
||||
things like EAGAIN, EINPROGRESS, etc. It has been verified that this will \
|
||||
not conflict with other error codes that are returned by these functions \
|
||||
under UNIX/Linux environments */
|
||||
|
||||
static int mca_oob_tcp_peer_start_connect(mca_oob_tcp_peer_t* peer);
|
||||
static int mca_oob_tcp_peer_event_init(mca_oob_tcp_peer_t* peer);
|
||||
static void mca_oob_tcp_peer_connected(mca_oob_tcp_peer_t* peer);
|
||||
@ -345,7 +345,6 @@ static int mca_oob_tcp_peer_start_connect(mca_oob_tcp_peer_t* peer)
|
||||
/* start the connect - will likely fail with EINPROGRESS */
|
||||
if(connect(peer->peer_sd, (struct sockaddr*)&inaddr, sizeof(inaddr)) < 0) {
|
||||
/* non-blocking so wait for completion */
|
||||
IMPORTANT_WINDOWS_COMMENT();
|
||||
if(ompi_socket_errno == EINPROGRESS || ompi_socket_errno == EWOULDBLOCK) {
|
||||
opal_event_add(&peer->peer_send_event, 0);
|
||||
/* Waiting for completion in the middle of the list ?! Let's just hope we try with the
|
||||
@ -611,7 +610,6 @@ static int mca_oob_tcp_peer_recv_blocking(mca_oob_tcp_peer_t* peer, void* data,
|
||||
|
||||
/* socket is non-blocking so handle errors */
|
||||
if(retval < 0) {
|
||||
IMPORTANT_WINDOWS_COMMENT();
|
||||
if(ompi_socket_errno != EINTR && ompi_socket_errno != EAGAIN && ompi_socket_errno != EWOULDBLOCK) {
|
||||
opal_output(0, "[%lu,%lu,%lu]-[%lu,%lu,%lu] mca_oob_tcp_peer_recv_blocking: recv() failed with errno=%d\n",
|
||||
ORTE_NAME_ARGS(orte_process_info.my_name),
|
||||
@ -638,7 +636,6 @@ static int mca_oob_tcp_peer_send_blocking(mca_oob_tcp_peer_t* peer, void* data,
|
||||
while(cnt < size) {
|
||||
int retval = send(peer->peer_sd, (char *)ptr+cnt, size-cnt, 0);
|
||||
if(retval < 0) {
|
||||
IMPORTANT_WINDOWS_COMMENT();
|
||||
if(ompi_socket_errno != EINTR && ompi_socket_errno != EAGAIN && ompi_socket_errno != EWOULDBLOCK) {
|
||||
opal_output(0, "[%lu,%lu,%lu]-[%lu,%lu,%lu] mca_oob_tcp_peer_send_blocking: send() failed with errno=%d\n",
|
||||
ORTE_NAME_ARGS(orte_process_info.my_name),
|
||||
|
@ -14,7 +14,13 @@
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*
|
||||
* In windows, many of the socket functions return an EWOULDBLOCK
|
||||
* instead of \ things like EAGAIN, EINPROGRESS, etc. It has been
|
||||
* verified that this will \ not conflict with other error codes that
|
||||
* are returned by these functions \ under UNIX/Linux environments
|
||||
*/
|
||||
|
||||
#include "orte_config.h"
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user