BUFINFO(3PVM) — Subroutines
NAME
pvm_bufinfo() − Returns information about a message buffer.
SYNOPSIS
Cint info = pvm_bufinfo( int bufid, int ∗bytes, int ∗msgtag, int ∗tid )
Fortrancall pvmfbufinfo( bufid, bytes, msgtag, tid, info )
PARAMETERS
bufidInteger specifying a particular message buffer identifier.
bytesInteger returning the length in bytes of the entire message.
msgtagInteger returning the message label. Useful when the message was received with a wildcard msgtag.
tidInteger returning the source of the message. Useful when the message was received with a wildcard tid.
infoInteger status code returned by the routine. Values less than zero indicate an error.
DESCRIPTION
The routine pvm_bufinfo returns information about the requested message buffer. Typically it is used to determine facts about the last received message such as its size or source. pvm_bufinfo is especially useful when an application is able to receive any incoming message, and the action taken depends on the source tid and the msgtag associated with the message that comes in first. If pvm_bufinfo is successful, info will be 0. If some error occurs then info will be < 0.
EXAMPLES
C:
bufid = pvm_recv( -1, -1 );
info = pvm_bufinfo( bufid, &bytes, &type, &source );
Fortran:
CALL PVMFRECV( -1, -1, BUFID )
CALL PVMFBUFINFO( BUFID, BYTES, TYPE, SOURCE, INFO )
ERRORS
This error condition can be returned by pvm_bufinfo.
PvmNoSuchBuf
specified buffer does not exist.
PvmBadParam
invalid argument
SEE ALSO
— 30 August, 1993