1
1

Rename OMPI_PROCESS_NAME_{HTON, NTOH} macros to ORTE_PROCESS_NAME_{HTON, NTOH}

because they are in ORTE, not OMPI.  Also, remove the ORTE_PROCESS_NAME macros
in iof base as they are duplicates of the ones that were in ns_types, which 
meant that bad things happened if you changed what an orte_process_name_t
looked like.

This commit was SVN r12646.
Этот коммит содержится в:
Brian Barrett 2006-11-22 03:03:21 +00:00
родитель 33320b7165
Коммит 0895f5e08d
5 изменённых файлов: 13 добавлений и 33 удалений

Просмотреть файл

@ -604,7 +604,7 @@ static void mca_btl_tcp_component_recv_handler(int sd, short flags, void* user)
CLOSE_THE_SOCKET(sd);
return;
}
OMPI_PROCESS_NAME_NTOH(guid);
ORTE_PROCESS_NAME_NTOH(guid);
/* now set socket up to be non-blocking */
if((flags = fcntl(sd, F_GETFL, 0)) < 0) {

Просмотреть файл

@ -278,7 +278,7 @@ static int mca_btl_tcp_endpoint_send_connect_ack(mca_btl_base_endpoint_t* btl_en
mca_btl_tcp_proc_t* btl_proc = mca_btl_tcp_proc_local();
orte_process_name_t guid = btl_proc->proc_name;
OMPI_PROCESS_NAME_HTON(guid);
ORTE_PROCESS_NAME_HTON(guid);
if(mca_btl_tcp_endpoint_send_blocking(btl_endpoint, &guid, sizeof(guid)) !=
sizeof(guid)) {
return OMPI_ERR_UNREACH;
@ -439,7 +439,7 @@ static int mca_btl_tcp_endpoint_recv_connect_ack(mca_btl_base_endpoint_t* btl_en
if((mca_btl_tcp_endpoint_recv_blocking(btl_endpoint, &guid, sizeof(orte_process_name_t))) != sizeof(orte_process_name_t)) {
return OMPI_ERR_UNREACH;
}
OMPI_PROCESS_NAME_NTOH(guid);
ORTE_PROCESS_NAME_NTOH(guid);
/* compare this to the expected values */
if(memcmp(&btl_proc->proc_name, &guid, sizeof(orte_process_name_t)) != 0) {

Просмотреть файл

@ -24,29 +24,6 @@
*/
#define ORTE_IOF_BASE_MSG_MAX 2048
/**
* Convert process name from network to host byte order.
*
* @param name
*/
#define ORTE_PROCESS_NAME_NTOH(n) \
n.cellid = ntohl((n).cellid); \
n.jobid = ntohl((n).jobid); \
n.vpid = ntohl((n).vpid);
/**
* Convert process name from host to network byte order.
*
* @param name
*/
#define ORTE_PROCESS_NAME_HTON(n) \
n.cellid = htonl((n).cellid); \
n.jobid = htonl((n).jobid); \
n.vpid = htonl((n).vpid);
#define ORTE_PROCESS_NAME_ARGS(n) \
n.cellid,n.jobid,n.vpid
/**
* Fields common to all headers.
*/

Просмотреть файл

@ -79,7 +79,10 @@ extern "C" {
/** Set the allowed range for ids in each space
*
* NOTE: Be sure to update the ORTE_NAME_ARGS #define (above) and all
* uses of it if these types change to be larger than (long)!
* uses of it if these types change to be larger than (long)! The
* HTON and NTOH macros below must be updated, as well as the MIN /
* MAX macros below and the datatype packing representations in
* ns_private.h
*/
typedef orte_std_cntr_t orte_jobid_t;
typedef orte_std_cntr_t orte_cellid_t;
@ -147,7 +150,7 @@ ORTE_DECLSPEC extern orte_process_name_t orte_ns_name_my_hnp; /** instantiated
*
* @param name
*/
#define OMPI_PROCESS_NAME_HTON(n) \
#define ORTE_PROCESS_NAME_HTON(n) \
n.cellid = htonl(n.cellid); \
n.jobid = htonl(n.jobid); \
n.vpid = htonl(n.vpid);
@ -157,7 +160,7 @@ ORTE_DECLSPEC extern orte_process_name_t orte_ns_name_my_hnp; /** instantiated
*
* @param name
*/
#define OMPI_PROCESS_NAME_NTOH(n) \
#define ORTE_PROCESS_NAME_NTOH(n) \
n.cellid = ntohl(n.cellid); \
n.jobid = ntohl(n.jobid); \
n.vpid = ntohl(n.vpid);

Просмотреть файл

@ -47,8 +47,8 @@ typedef struct mca_oob_tcp_hdr_t mca_oob_tcp_hdr_t;
* Convert the message header to host byte order
*/
#define MCA_OOB_TCP_HDR_NTOH(h) \
OMPI_PROCESS_NAME_NTOH((h)->msg_src); \
OMPI_PROCESS_NAME_NTOH((h)->msg_dst); \
ORTE_PROCESS_NAME_NTOH((h)->msg_src); \
ORTE_PROCESS_NAME_NTOH((h)->msg_dst); \
(h)->msg_type = ntohl((h)->msg_type); \
(h)->msg_size = ntohl((h)->msg_size); \
(h)->msg_tag = ntohl((h)->msg_tag);
@ -57,8 +57,8 @@ typedef struct mca_oob_tcp_hdr_t mca_oob_tcp_hdr_t;
* Convert the message header to network byte order
*/
#define MCA_OOB_TCP_HDR_HTON(h) \
OMPI_PROCESS_NAME_HTON((h)->msg_src); \
OMPI_PROCESS_NAME_HTON((h)->msg_dst); \
ORTE_PROCESS_NAME_HTON((h)->msg_src); \
ORTE_PROCESS_NAME_HTON((h)->msg_dst); \
(h)->msg_type = htonl((h)->msg_type); \
(h)->msg_size = htonl((h)->msg_size); \
(h)->msg_tag = htonl((h)->msg_tag);