[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]


   NAME
        CreateMsgPort - allocate and initialize a new message port  (v36)

   SYNOPSIS
        CreateMsgPort()

        struct msgport * createmsgport(void);

   FUNCTION
        Allocates and initializes a new message port.  The message list
        of the new port will be prepared for use (via NewList).  A signal
        bit will be allocated, and the port will be set to signal your
        task when a message arrives (PA_SIGNAL).

        You *must* use deletemsgport() to delete ports created with
        CreateMsgPort()!

   RESULT
        msgport - a new msgport structure ready for use, or null if out of
                memory or signals.  If you wish to add this port to the public
                port list, fill in the ln_Name and ln_Pri fields, then call
                addport().  don't forget remport()!

   SEE ALSO
        deletemsgport(), exec/addport(), exec/ports.h, amiga.lib/createport()