home *** CD-ROM | disk | FTP | other *** search
/ back2roots/padua / padua.7z / padua / uucp / duucp-1.17 / AU-117b4-src.lha / src / fifolib / defs.h next >
Encoding:
C/C++ Source or Header  |  1994-04-13  |  1.7 KB  |  80 lines

  1.  
  2. /*
  3.  *  DEFS.H
  4.  *
  5.  */
  6.  
  7. #include <exec/types.h>
  8. #include <exec/nodes.h>
  9. #include <exec/ports.h>
  10. #include <exec/memory.h>
  11. #include <exec/libraries.h>
  12. #include <exec/execbase.h>
  13. #include <exec/semaphores.h>
  14. #include <devices/timer.h>
  15.  
  16. #include <clib/alib_protos.h>
  17. #include <clib/exec_protos.h>
  18.  
  19. #include <pragmas/exec_pragmas.h>
  20.  
  21. #define IN_LIBRARY
  22. #include "fifo.h"
  23. #include <string.h>
  24.  
  25. #define LibCall __geta4 __stkargs
  26. #define Prototype extern
  27.  
  28. typedef unsigned char ubyte;
  29. typedef unsigned short uword;
  30. typedef unsigned long ulong;
  31. typedef struct MsgPort    MsgPort;
  32. typedef struct Message    Message;
  33. typedef struct MinNode    Node;
  34. typedef struct MinList    List;
  35. typedef struct List    MaxList;
  36. typedef struct Node    MaxNode;
  37. typedef struct Library    Library;
  38. typedef struct ExecBase ExecBase;
  39. typedef struct timerequest Iot;
  40. typedef struct SignalSemaphore SignalSemaphore;
  41.  
  42. #define FIFOF_CLOSEOF    0x00010000
  43. #define FIFOF_RDNORM    0x00020000
  44. #define FIFOF_WRNORM    0x00040000
  45.  
  46. typedef struct Fifo {
  47.     MaxNode fi_Node;
  48.     List    fi_HanList;
  49.     List    fi_WrNotify;
  50.     List    fi_RdNotify;
  51.     uword   fi_RRefs;
  52.     uword   fi_WRefs;
  53.     uword   fi_ORefs;
  54.     ubyte   fi_Lock;        /*  non-normal fifo's   */
  55.     ubyte   fi_Reserved;
  56.     long    fi_RIdx;
  57.     long    fi_WIdx;
  58.     long    fi_Flags;
  59.     SignalSemaphore fi_SigSem;    /*  normal fifo's       */
  60.     long    fi_BufSize;
  61.     long    fi_BufMask;
  62.     char    fi_Buf[4];
  63. } Fifo;
  64.  
  65. typedef struct FHan {
  66.     Node    fh_Node;
  67.     Fifo    *fh_Fifo;
  68.     long    fh_Flags;
  69.     MsgPort fh_Port;
  70.     Message fh_Msg;
  71.     long    fh_RIdx;
  72. } FHan;
  73.  
  74. extern const char LibName[];
  75. extern const char LibId[];
  76. extern List FifoList;
  77. extern ExecBase *SysBase;
  78.  
  79. #include "fifolib-protos.h"
  80.