NSEND (2)
Send and receive LAM network
messages.
C SYNOPSIS
#include <net.h>
int nsend (struct nmsg *header);
int ntry_send (struct nmsg *header);
int nrecv (struct nmsg *header);
int ntry_recv (struct nmsg *header);
FORTRAN SYNOPSIS
subroutine NSND (nnode, nevent, ntype, nlength, nflags, ndata,
ndsize, nmsg, ierror)
subroutine NRCV (nevent, ntype, nlength, nflags, ndata, ndsize,
nmsg, ierror)
integer nevent, ntype, nlength, nflags, ndata(*), ndsize, ierror
<type> nmsg(*)
DESCRIPTION
The network message-passing functions add routing and packetization
to the datalink functions, dsend(2) and drecv(2).
nrecv()
blocks if there is no synchronizing message to receive.
nsend()
will block if there is no synchronizing receiving process
or forwarding process to take its message (see "Blocking").
ntry_send()
and
ntry_recv()
never cause the calling process to block.
The message is either immediately transferred, or an error is immediately
returned, indicating that the process would have blocked.
See nprobe(2) for similar functionality.
All of the functions accept a pointer to a network message descriptor
which is an extension of the local level message descriptor
used by ksend(2) and krecv(2).
The network message descriptor is defined in <net.h>.
struct nmsg {
int nh_dl_event;
int nh_dl_link;
int nh_node;
int nh_event;
int nh_type;
int nh_length;
int nh_flags;
int nh_data[NHDSIZE];
char *nh_msg;
};
|