allocate send request and first fragment together
This commit was SVN r643.
Этот коммит содержится в:
родитель
3836a7bf33
Коммит
a4738b19da
37
src/mca/mpi/ptl/tcp/src/ptl_tcp_sendreq.c
Обычный файл
37
src/mca/mpi/ptl/tcp/src/ptl_tcp_sendreq.c
Обычный файл
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* $HEADER$
|
||||
*/
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/errno.h>
|
||||
#include "lam/types.h"
|
||||
#include "mca/mpi/ptl/base/ptl_base_sendreq.h"
|
||||
#include "ptl_tcp.h"
|
||||
#include "ptl_tcp_sendreq.h"
|
||||
|
||||
|
||||
static void mca_ptl_tcp_send_request_init(mca_ptl_tcp_send_request_t*);
|
||||
static void mca_ptl_tcp_send_request_destroy(mca_ptl_tcp_send_request_t*);
|
||||
|
||||
|
||||
lam_class_info_t mca_ptl_tcp_send_request_cls = {
|
||||
"mca_ptl_tcp_send_request_t",
|
||||
&mca_ptl_base_send_request_cls,
|
||||
(class_init_t)mca_ptl_tcp_send_request_init,
|
||||
(class_destroy_t)mca_ptl_tcp_send_request_destroy
|
||||
};
|
||||
|
||||
|
||||
void mca_ptl_tcp_send_request_init(mca_ptl_tcp_send_request_t* request)
|
||||
{
|
||||
SUPER_INIT(request, &mca_ptl_base_send_request_cls);
|
||||
STATIC_INIT(request->req_frag, &mca_ptl_tcp_send_request_cls);
|
||||
}
|
||||
|
||||
|
||||
void mca_ptl_tcp_send_request_destroy(mca_ptl_tcp_send_request_t* request)
|
||||
{
|
||||
STATIC_DESTROY(request->req_frag);
|
||||
SUPER_DESTROY(request, &mca_ptl_base_send_request_cls);
|
||||
}
|
||||
|
27
src/mca/mpi/ptl/tcp/src/ptl_tcp_sendreq.h
Обычный файл
27
src/mca/mpi/ptl/tcp/src/ptl_tcp_sendreq.h
Обычный файл
@ -0,0 +1,27 @@
|
||||
/* @file
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef MCA_PTL_TCP_SEND_REQUEST_H
|
||||
#define MCA_PTL_TCP_SEND_REQUEST_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include "lam_config.h"
|
||||
#include "mca/mpi/ptl/base/ptl_base_sendreq.h"
|
||||
#include "ptl_tcp_sendfrag.h"
|
||||
|
||||
|
||||
extern lam_class_info_t mca_ptl_tcp_send_request_cls;
|
||||
|
||||
struct mca_ptl_tcp_send_request_t {
|
||||
mca_ptl_base_send_request_t super;
|
||||
mca_ptl_tcp_send_frag_t req_frag; /* first fragment */
|
||||
};
|
||||
typedef struct mca_ptl_tcp_send_request_t mca_ptl_tcp_send_request_t;
|
||||
|
||||
|
||||
#endif
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user