1
1

corrections to sequence size/initialization

This commit was SVN r3686.
Этот коммит содержится в:
Tim Woodall 2004-12-02 21:47:40 +00:00
родитель a689d68a2e
Коммит b17bb7927c
3 изменённых файлов: 9 добавлений и 9 удалений

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

@ -53,16 +53,16 @@ int mca_pml_ptl_comm_init_size(mca_pml_ptl_comm_t* comm, size_t size)
size_t i;
/* send message sequence-number support - sender side */
comm->c_msg_seq = malloc(sizeof(uint16_t) * size);
comm->c_msg_seq = malloc(sizeof(uint32_t) * size);
if(NULL == comm->c_msg_seq)
return OMPI_ERR_OUT_OF_RESOURCE;
memset(comm->c_msg_seq, 0, sizeof(uint16_t) * size);
memset(comm->c_msg_seq, 0, sizeof(uint32_t) * size);
/* send message sequence-number support - receiver side */
comm->c_next_msg_seq = malloc(sizeof(uint32_t) * size);
comm->c_next_msg_seq = malloc(sizeof(uint16_t) * size);
if(NULL == comm->c_next_msg_seq)
return OMPI_ERR_OUT_OF_RESOURCE;
memset(comm->c_next_msg_seq, 0, sizeof(uint32_t) * size);
memset(comm->c_next_msg_seq, 0, sizeof(uint16_t) * size);
/* unexpected fragments queues */
comm->c_unexpected_frags = malloc(sizeof(ompi_list_t) * size);

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

@ -32,7 +32,7 @@ OMPI_DECLSPEC extern ompi_class_t mca_pml_ptl_comm_t_class;
*/
struct mca_pml_comm_t {
ompi_object_t super;
uint16_t *c_msg_seq; /**< send message sequence number - sender side */
uint32_t *c_msg_seq; /**< send message sequence number - sender side */
uint16_t *c_next_msg_seq; /**< send message sequence number - receiver side */
mca_ptl_sequence_t c_recv_seq; /**< recv request sequence number - receiver side */
ompi_mutex_t c_matching_lock; /**< matching lock */
@ -62,10 +62,10 @@ OMPI_DECLSPEC extern int mca_pml_ptl_comm_init_size(mca_pml_ptl_comm_t* comm, si
* @return Next available sequence number.
*/
static inline uint32_t mca_pml_ptl_comm_send_sequence(mca_pml_ptl_comm_t* comm, int dst)
static inline mca_ptl_sequence_t mca_pml_ptl_comm_send_sequence(mca_pml_ptl_comm_t* comm, int dst)
{
volatile int32_t* msg_seq = (volatile int32_t*)(comm->c_msg_seq+dst);
return OMPI_THREAD_ADD32(msg_seq, 1)-1;
volatile int32_t *msg_seq = (volatile int32_t*)(comm->c_msg_seq+dst);
return (mca_ptl_sequence_t)OMPI_THREAD_ADD32(msg_seq, 1)-1;
}
#if defined(c_plusplus) || defined(__cplusplus)

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

@ -351,7 +351,7 @@ bool mca_ptl_base_match(
OMPI_THREAD_LOCK(&pml_comm->c_matching_lock);
/* get sequence number of next message that can be processed */
next_msg_seq_expected = *((pml_comm->c_next_msg_seq)+frag_src);
next_msg_seq_expected = (uint16_t)*((pml_comm->c_next_msg_seq)+frag_src);
if (frag_msg_seq == next_msg_seq_expected) {
/*