[comp.sys.transputer] Help with Nsend

ralph@cs.ubc.ca (Scott Ralph) (11/09/90)

I am having trouble using nrecv() when the data field
becomes larger than 4096 bytes -- the maximum number of
bytes for a single message.

        extern int errno;
        struct nmsg header;

        HostMessage host_message;

        typedef Message *MessagePtr;

        typedef struct hMsg {
           unsigned char sending_processor;
           unsigned char rows;
           unsigned char cols;
           unsigned char type;
           unsigned char generation;
           char    data [NUMBER_PIXELS_IN_REGION];
        } HostMessage;

        typedef HostMessage *HostMessagePtr;

    header.nh_event = 0;
    header.nh_type = 0;
    header.nh_length = sizeof (HostMessage);
    header.nh_flags = 0;
    header.nh_msg = (char *) &host_message;

    if ( nrecv (&header)) {
        printf("Death # 1 -- %d\n", errno);
        fflush(stdout);
        kexit (errno);*
    }


The nrecv() returns with errno #4 -- EINTR
This corresponds to an interrupted system call.


NSEND(l)            TROLLIUS NETWORK LIBRARY             NSEND(l)
     The nh_length field holds the length (in bytes) of the  mes-
     sage  to  be  sent.   If the sender and the receiver specify
     different lengths, the lesser amount  will  be  transferred.
     The  datalink  functions called by nsend have a maximum mes-
     sage length of MAXNMSGLEN (defined in  <trillium/net.h>  and
     currently  set  to  4096  bytes).   Messages  exceeding this
     length will be implicitly  broken  down  into  a  series  of
     smaller  messages, which will be recombined at the receiving
     end.

-------------


I am not sure if additional information must be specified (i.e.
the nh_flags field?) or not.

Any Suggestions?

-- scott ralph