home *** CD-ROM | disk | FTP | other *** search
- /*
- * WAITMSG.C
- *
- * Wait for a message to be returned to its reply port then remove it
- */
-
- #include <exec/types.h>
- #include <exec/ports.h>
- #include <stdio.h>
- #include "config.h"
-
- Prototype void WaitMsg (struct Message *);
-
- void
- WaitMsg (struct Message *msg)
- {
- while (msg->mn_Node.ln_Type != NT_REPLYMSG)
- Wait (1 << msg->mn_ReplyPort->mp_SigBit);
-
- Forbid ();
- Remove (&msg->mn_Node);
- Permit ();
-
- return;
- }
-