home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / compiler / alib / createextio.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-27  |  1.1 KB  |  62 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: createextio.c,v 1.2 1997/01/27 00:16:35 ldp Exp $
  4.  
  5.     Desc:
  6.     Lang: english
  7. */
  8. #include <exec/memory.h>
  9. #include <proto/exec.h>
  10.  
  11. /*****************************************************************************
  12.  
  13.     NAME */
  14. #include <exec/io.h>
  15. #include <proto/alib.h>
  16.  
  17.     struct IORequest * CreateExtIO (
  18.  
  19. /*  SYNOPSIS */
  20.     struct MsgPort * port,
  21.     ULONG         iosize)
  22.  
  23. /*  FUNCTION
  24.     Create an extended IORequest structure. This structure can
  25.     be freed with DeleteExtIO().
  26.  
  27.     INPUTS
  28.     port - MsgPort to be signaled on events
  29.     iosize - Size of the structure
  30.  
  31.     RESULT
  32.     A pointer to the new IORequest structure.
  33.  
  34.     NOTES
  35.  
  36.     EXAMPLE
  37.  
  38.     BUGS
  39.  
  40.     SEE ALSO
  41.     CreateStdIO(), DeleteExtIO()
  42.  
  43.     INTERNALS
  44.  
  45.     HISTORY
  46.  
  47. ******************************************************************************/
  48. {
  49.     struct IORequest *ioreq=NULL;
  50.  
  51.     if (port && (ioreq = AllocMem (iosize, MEMF_CLEAR|MEMF_PUBLIC)))
  52.     {
  53.     /* Initialize the structure */
  54.     ioreq->io_Message.mn_Node.ln_Type = NT_MESSAGE;
  55.     ioreq->io_Message.mn_ReplyPort      = port;
  56.     ioreq->io_Message.mn_Length      = iosize;
  57.     }
  58.  
  59.     return ioreq;
  60. } /* CreateExtIO */
  61.  
  62.