Remove some useless includes
Use the struct to avoid additional dependencies. This commit was SVN r3121.
Этот коммит содержится в:
родитель
1fafed88c6
Коммит
da1c28b966
@ -14,8 +14,6 @@
|
||||
#include "event/event.h"
|
||||
#include "mca/pml/pml.h"
|
||||
#include "mca/ptl/ptl.h"
|
||||
#include "ptl_tcp_recvfrag.h"
|
||||
#include "ptl_tcp_sendfrag.h"
|
||||
|
||||
/**
|
||||
* State of TCP peer connection.
|
||||
@ -37,23 +35,22 @@ typedef enum {
|
||||
* and PTL pair at startup. However, connections to the peer
|
||||
* are established dynamically on an as-needed basis:
|
||||
*/
|
||||
|
||||
struct mca_ptl_base_peer_t {
|
||||
ompi_list_item_t super;
|
||||
struct mca_ptl_tcp_module_t* peer_ptl; /**< PTL instance that created this connection */
|
||||
struct mca_ptl_tcp_proc_t* peer_proc; /**< proc structure corresponding to peer */
|
||||
struct mca_ptl_tcp_addr_t* peer_addr; /**< address of peer */
|
||||
int peer_sd; /**< socket connection to peer */
|
||||
mca_ptl_tcp_send_frag_t* peer_send_frag; /**< current send frag being processed */
|
||||
mca_ptl_tcp_recv_frag_t* peer_recv_frag; /**< current recv frag being processed */
|
||||
mca_ptl_tcp_state_t peer_state; /**< current state of the connection */
|
||||
size_t peer_retries; /**< number of connection retries attempted */
|
||||
ompi_list_t peer_frags; /**< list of pending frags to send */
|
||||
ompi_mutex_t peer_send_lock; /**< lock for concurrent access to peer state */
|
||||
ompi_mutex_t peer_recv_lock; /**< lock for concurrent access to peer state */
|
||||
ompi_event_t peer_send_event; /**< event for async processing of send frags */
|
||||
ompi_event_t peer_recv_event; /**< event for async processing of recv frags */
|
||||
bool peer_byte_swap; /**< is peer a different byte ordering? */
|
||||
ompi_list_item_t super;
|
||||
struct mca_ptl_tcp_module_t* peer_ptl; /**< PTL instance that created this connection */
|
||||
struct mca_ptl_tcp_proc_t* peer_proc; /**< proc structure corresponding to peer */
|
||||
struct mca_ptl_tcp_addr_t* peer_addr; /**< address of peer */
|
||||
int peer_sd; /**< socket connection to peer */
|
||||
struct mca_ptl_tcp_send_frag_t* peer_send_frag; /**< current send frag being processed */
|
||||
struct mca_ptl_tcp_recv_frag_t* peer_recv_frag; /**< current recv frag being processed */
|
||||
mca_ptl_tcp_state_t peer_state; /**< current state of the connection */
|
||||
size_t peer_retries; /**< number of connection retries attempted */
|
||||
ompi_list_t peer_frags; /**< list of pending frags to send */
|
||||
ompi_mutex_t peer_send_lock; /**< lock for concurrent access to peer state */
|
||||
ompi_mutex_t peer_recv_lock; /**< lock for concurrent access to peer state */
|
||||
ompi_event_t peer_send_event; /**< event for async processing of send frags */
|
||||
ompi_event_t peer_recv_event; /**< event for async processing of recv frags */
|
||||
bool peer_byte_swap; /**< is peer a different byte ordering? */
|
||||
};
|
||||
typedef struct mca_ptl_base_peer_t mca_ptl_base_peer_t;
|
||||
|
||||
@ -62,7 +59,7 @@ typedef struct mca_ptl_base_peer_t mca_ptl_tcp_peer_t;
|
||||
|
||||
void mca_ptl_tcp_set_socket_options(int sd);
|
||||
void mca_ptl_tcp_peer_close(mca_ptl_base_peer_t*);
|
||||
int mca_ptl_tcp_peer_send(mca_ptl_base_peer_t*, mca_ptl_tcp_send_frag_t*, int);
|
||||
int mca_ptl_tcp_peer_send(mca_ptl_base_peer_t*, struct mca_ptl_tcp_send_frag_t*, int);
|
||||
bool mca_ptl_tcp_peer_accept(mca_ptl_base_peer_t*, struct sockaddr_in*, int);
|
||||
void mca_ptl_tcp_peer_shutdown(mca_ptl_base_peer_t*);
|
||||
|
||||
|
@ -52,8 +52,8 @@ static inline mca_ptl_tcp_proc_t* mca_ptl_tcp_proc_local(void)
|
||||
return mca_ptl_tcp_component.tcp_local;
|
||||
}
|
||||
|
||||
int mca_ptl_tcp_proc_insert(mca_ptl_tcp_proc_t*, mca_ptl_base_peer_t*);
|
||||
int mca_ptl_tcp_proc_remove(mca_ptl_tcp_proc_t*, mca_ptl_base_peer_t*);
|
||||
int mca_ptl_tcp_proc_insert(mca_ptl_tcp_proc_t*, struct mca_ptl_base_peer_t*);
|
||||
int mca_ptl_tcp_proc_remove(mca_ptl_tcp_proc_t*, struct mca_ptl_base_peer_t*);
|
||||
bool mca_ptl_tcp_proc_accept(mca_ptl_tcp_proc_t*, struct sockaddr_in*, int sd);
|
||||
|
||||
#endif
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user