The dpgetmsg man page







NAME
     dpgetmsg - receive asynchronous DP messages

SYNOPSIS
     #include 

     int dpgetmsg(src, data, limit)
     DPID *src;
     char *data;
     int limit;

DESCRIPTION
     dpgetmsg() is used to retrieve asynchronously sent  messages
     originated  from any other DP process.  The source process's
     dpid (see man pages for dpgetpid(3DP) for a  description  of
     dpid) is returned in src.

     DP supports two types of messages: synchronous and asynchro-
     nous.   The former are also called non-interrupting messages
     and are queued upon their arrival at the destination process
     and must be retrieved explicitly by calling dprecv().

     Asynchronous messages, also  termed  interrupting  messages,
     will  interrupt  their  target  process  upon arrival.  This
     "out-of-band" behavior can be used to send urgent  condition
     signals, among other things.

     When a DP process first starts, it should call  dpcatchmsg()
     to  specify  an  asynchronous message catcher.  This catcher
     will be invoked every time an asynchronous  message  arrives
     and is coded to decide what to do with such messages.  Typi-
     cally the catcher calls dpgetmsg() to retrieve an  asynchro-
     nous message, examines its nature, and takes the appropriate
     action.  It repeats this process until no  further  messages
     are  contingent on the asynchronous queue, at which point it
     returns control to the interrupted worker function.

     dpgetmsg() returns immediately with an error code if no data
     are available on the queue. It can never block.

     Care should be taken when transmitting data between machines
     that  have different byte-ordering schemes (i.e., big-endian
     or little-endian).  DP does not perform  any  conversion  on
     the  user data it sends and receives, so the user is respon-
     sible for making any  necessary  conversions.   Examples  of
     big-endian systems are most UNIX workstations (including Sun
     SPARCs and IBM RS/6000s), Motorola 68k series, and  the  KSR
     supercomputer.   Examples of little-endian systems are Intel
     80x86s and DEC workstations.

RETURN VALUES
     Upon success, dpgetmsg() returns 0.   Otherwise  a  negative






     integer is returned indicating one of the following errors:

          DPFAIL         General DP failure

          DPNOMESSAGE    The message queue is empty

REMARK
     This is a DP function call.

AUTHOR
     David Arnow

FILES
     /usr/include/dp/dp.h - DP header file
     /usr/lib/libdp.a     - DP library file

SEE ALSO
     dpcatchmsg(3DP),  dpsend(3DP),  dpwrite(3DP),   dprecv(3DP),
     dpgetpid(3DP)





Essential DP MAN Pages:

General/Essential:


Non-Interrupting Messages:


Interrupting Messages:
  • dpblock
  • dpcatchmsg
  • dpgetmsg
  • dppause
  • dpunblock

    Other:
    Return to DP For Students Return to The DP Project Return to David Arnow's Home Page