Article View: comp.sys.transputer
Article #1089Help with Nsend()
From: Scott Ralph
Date: Thu, 08 Nov 1990 18:33
Date: Thu, 08 Nov 1990 18:33
59 lines
2214 bytes
2214 bytes
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
Technical Details
Message-ID:
<10391@ubc-cs.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uakari.primate.wisc.edu!dali.cs.montana.edu!milton!uw-beaver!ubc-cs!ralphShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uakari.primate.wisc.edu!dali.cs.montana.edu!milton!uw-beaver!ubc-cs!ralph From: ralph@cs.ubc.ca (Scott Ralph) Newsgroups: comp.sys.transputer Subject: Help with Nsend() Message-ID: <10391@ubc-cs.UUCP> Date: 8 Nov 90 18:33:38 GMT Sender: news@cs.ubc.ca Distribution: na Organization: University of British Columbia, Vancouver, B.C., Canada Lines: 59