home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / DC-POS24.LZX / pOS / pOSxA.lzx / pOSxA / clib / exec_protos.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-03-12  |  8.5 KB  |  220 lines

  1. #ifndef  CLIB_EXEC_PROTOS_H
  2. #define  CLIB_EXEC_PROTOS_H
  3.  
  4. /*******************************************************************
  5.  pOS / Amiga adapt
  6. *******************************************************************/
  7.  
  8. #ifndef  EXEC_TYPES_H
  9. #include <exec/types.h>
  10. #endif
  11. #ifndef  EXEC_TASKS_H
  12. #include <exec/tasks.h>
  13. #endif
  14.  
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18.  
  19. struct Library *MakeLibrary( APTR funcInit, APTR structInit,
  20.     unsigned long (*libInit)(), unsigned long dataSize,
  21.     unsigned long segList );
  22. void MakeFunctions( APTR target, APTR functionArray,
  23.     unsigned long funcDispBase );
  24. struct Resident *FindResident( UBYTE *name );
  25. APTR InitResident( struct Resident *resident, unsigned long segList );
  26.  
  27. void Alert( unsigned long alertNum );
  28.  
  29. void Disable( void );
  30. void Enable( void );
  31. void Forbid( void );
  32. void Permit( void );
  33.  
  34. APTR Allocate( struct MemHeader *freeList, unsigned long byteSize );
  35. void Deallocate( struct MemHeader *freeList, APTR memoryBlock,
  36.     unsigned long byteSize );
  37. APTR AllocMem( unsigned long byteSize, unsigned long requirements );
  38. APTR AllocAbs( unsigned long byteSize, APTR location );
  39. void FreeMem( APTR memoryBlock, unsigned long byteSize );
  40. ULONG AvailMem( unsigned long requirements );
  41. struct MemList *AllocEntry( struct MemList *entry );
  42. void FreeEntry( struct MemList *entry );
  43.  
  44. void Insert( struct List *list, struct Node *node, struct Node *pred );
  45. void AddHead( struct List *list, struct Node *node );
  46. void AddTail( struct List *list, struct Node *node );
  47. void Remove( struct Node *node );
  48. struct Node *RemHead( struct List *list );
  49. struct Node *RemTail( struct List *list );
  50. void Enqueue( struct List *list, struct Node *node );
  51. struct Node *FindName( struct List *list, UBYTE *name );
  52.  
  53. APTR AddTask( struct Task *task, APTR initPC, APTR finalPC );
  54. void RemTask( struct Task *task );
  55. struct Task *FindTask( UBYTE *name );
  56. BYTE SetTaskPri( struct Task *task, long priority );
  57. ULONG SetSignal( unsigned long newSignals, unsigned long signalSet );
  58. ULONG SetExcept( unsigned long newSignals, unsigned long signalSet );
  59. ULONG Wait( unsigned long signalSet );
  60. void Signal( struct Task *task, unsigned long signalSet );
  61. BYTE AllocSignal( long signalNum );
  62. void FreeSignal( long signalNum );
  63.  
  64. void AddPort( struct MsgPort *port );
  65. void RemPort( struct MsgPort *port );
  66. void PutMsg( struct MsgPort *port, struct Message *message );
  67. struct Message *GetMsg( struct MsgPort *port );
  68. void ReplyMsg( struct Message *message );
  69. struct Message *WaitPort( struct MsgPort *port );
  70. struct MsgPort *FindPort( UBYTE *name );
  71.  
  72. void AddLibrary( struct Library *library );
  73. void RemLibrary( struct Library *library );
  74. struct Library *OldOpenLibrary( UBYTE *libName );
  75. void CloseLibrary( struct Library *library );
  76. APTR SetFunction( struct Library *library, long funcOffset,
  77.     unsigned long (*newFunction)() );
  78. void SumLibrary( struct Library *library );
  79.  
  80. void AddDevice( struct Device *device );
  81. void RemDevice( struct Device *device );
  82. BYTE OpenDevice( UBYTE *devName, unsigned long unit,
  83.     struct IORequest *ioRequest, unsigned long flags );
  84. void CloseDevice( struct IORequest *ioRequest );
  85. BYTE DoIO( struct IORequest *ioRequest );
  86. void SendIO( struct IORequest *ioRequest );
  87. struct IORequest *CheckIO( struct IORequest *ioRequest );
  88. BYTE WaitIO( struct IORequest *ioRequest );
  89. void AbortIO( struct IORequest *ioRequest );
  90.  
  91. void AddResource( APTR resource );
  92. void RemResource( APTR resource );
  93. APTR OpenResource( UBYTE *resName );
  94.  
  95. ULONG TypeOfMem( APTR address );
  96. VOID Procure( struct SignalSemaphore *sigSem,struct SemaphoreMessage *bidMsg );
  97. void Vacate( struct SignalSemaphore *sigSem,struct SemaphoreMessage *bidMsg );
  98. struct Library *OpenLibrary( UBYTE *libName, unsigned long version );
  99.  
  100. void InitSemaphore( struct SignalSemaphore *sigSem );
  101. void ObtainSemaphore( struct SignalSemaphore *sigSem );
  102. void ReleaseSemaphore( struct SignalSemaphore *sigSem );
  103. ULONG AttemptSemaphore( struct SignalSemaphore *sigSem );
  104. void ObtainSemaphoreList( struct List *sigSem );
  105. void ReleaseSemaphoreList( struct List *sigSem );
  106. struct SignalSemaphore *FindSemaphore( UBYTE *sigSem );
  107. void AddSemaphore( struct SignalSemaphore *sigSem );
  108. void RemSemaphore( struct SignalSemaphore *sigSem );
  109.  
  110. void CopyMem( APTR source, APTR dest, unsigned long size );
  111. void CopyMemQuick( APTR source, APTR dest, unsigned long size );
  112.  
  113. void CacheClearU( void );
  114. void CacheClearE( APTR address, unsigned long length, unsigned long caches );
  115. ULONG CacheControl( unsigned long cacheBits, unsigned long cacheMask );
  116.  
  117. APTR CreateIORequest( struct MsgPort *port, unsigned long size );
  118. void DeleteIORequest( APTR iorequest );
  119. struct MsgPort *CreateMsgPort( void );
  120. void DeleteMsgPort( struct MsgPort *port );
  121. void ObtainSemaphoreShared( struct SignalSemaphore *sigSem );
  122.  
  123. APTR AllocVec( unsigned long byteSize, unsigned long requirements );
  124. void FreeVec( APTR memoryBlock );
  125.  
  126. void ColdReboot( void );
  127. void StackSwap( struct StackSwapStruct *newStack );
  128.  
  129. void AddMemHandler( struct Interrupt *memhand );
  130. void RemMemHandler( struct Interrupt *memhand );
  131.  
  132. APTR CreatePool(ULONG requirements,ULONG puddleSize,ULONG threshSize );
  133. void DeletePool( APTR poolHeader );
  134. APTR AllocPooled( APTR poolHeader, unsigned long memSize );
  135. void FreePooled( APTR poolHeader, APTR memory, unsigned long memSize );
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142. #ifdef __IGNORE_NOT_SUPPORTED__
  143.  
  144.   ULONG AttemptSemaphoreShared( struct SignalSemaphore *sigSem );
  145.  
  146.   void Debug( unsigned long flags );
  147.   struct Interrupt *SetIntVector( long intNumber, struct Interrupt *interrupt );
  148.   void AddIntServer( long intNumber, struct Interrupt *interrupt );
  149.   void RemIntServer( long intNumber, struct Interrupt *interrupt );
  150.   void Cause( struct Interrupt *interrupt );
  151.   LONG AllocTrap( long trapNum );
  152.   void FreeTrap( long trapNum );
  153.   APTR RawDoFmt(UBYTE *formatString, APTR dataStream, void(*putChProc)(),APTR putChData);
  154.   ULONG GetCC( void );
  155.   ULONG SumKickData( void );
  156.   void AddMemList(ULONG size,ULONG attributes, long pri,APTR base, UBYTE *name );
  157.   void ChildFree( APTR tid );
  158.   void ChildOrphan( APTR tid );
  159.   void ChildStatus( APTR tid );
  160.   void ChildWait( APTR tid );
  161.   APTR CachePreDMA( APTR address, ULONG *length, unsigned long flags );
  162.   void CachePostDMA( APTR address, ULONG *length, unsigned long flags );
  163.   ULONG ObtainQuickVector( APTR interruptCode );
  164.  
  165. #else  /** __IGNORE_NOT_SUPPORTED__ **/
  166.  
  167. #define AttemptSemaphoreShared AttemptSemaphoreShared_NOT_SUPPORTED
  168.   ULONG AttemptSemaphoreShared(struct NOT_SUPPORTED*, struct SignalSemaphore *sigSem );
  169.  
  170. #define Debug Debug_NOT_COMPATIBLE
  171.   void Debug(struct NOT_SUPPORTED*, unsigned long flags );
  172. #define SetIntVector SetIntVector_NOT_SUPPORTED
  173.   struct Interrupt *SetIntVector(struct NOT_SUPPORTED*, long intNumber, struct Interrupt *interrupt );
  174. #define AddIntServer AddIntServer_NOT_SUPPORTED
  175.   void AddIntServer(struct NOT_SUPPORTED*, long intNumber, struct Interrupt *interrupt );
  176. #define RemIntServer RemIntServer_NOT_SUPPORTED
  177.   void RemIntServer(struct NOT_SUPPORTED*, long intNumber, struct Interrupt *interrupt );
  178. #define Cause Cause_NOT_SUPPORTED
  179.   void Cause(struct NOT_SUPPORTED*, struct Interrupt *interrupt );
  180. #define AllocTrap AllocTrap_NOT_COMPATIBLE
  181.   LONG AllocTrap(struct NOT_SUPPORTED*, long trapNum );
  182. #define FreeTrap FreeTrap_NOT_COMPATIBLE
  183.   void FreeTrap(struct NOT_SUPPORTED*, long trapNum );
  184. #define RawDoFmt RawDoFmt_NOT_COMPATIBLE
  185.   APTR RawDoFmt(struct NOT_SUPPORTED*,UBYTE *formatString, APTR dataStream, void(*putChProc)(),APTR putChData);
  186. #define GetCC GetCC_NOT_COMPATIBLE
  187.   ULONG GetCC(struct NOT_SUPPORTED*);
  188. #define SumKickData SumKickData_NOT_COMPATIBLE
  189.   ULONG SumKickData(struct NOT_SUPPORTED*);
  190. #define AddMemList AddMemList_NOT_SUPPORTED
  191.   void AddMemList(struct NOT_SUPPORTED*,ULONG size,ULONG attributes, long pri,APTR base, UBYTE *name );
  192. #define ChildFree ChildFree_NOT_SUPPORTED
  193.   void ChildFree(struct NOT_SUPPORTED*, APTR tid );
  194. #define ChildOrphan ChildOrphan_NOT_SUPPORTED
  195.   void ChildOrphan(struct NOT_SUPPORTED*, APTR tid );
  196. #define ChildStatus ChildStatus_NOT_SUPPORTED
  197.   void ChildStatus(struct NOT_SUPPORTED*, APTR tid );
  198. #define ChildWait ChildWait_NOT_SUPPORTED
  199.   void ChildWait(struct NOT_SUPPORTED*, APTR tid );
  200. #define CachePreDMA CachePreDMA_NOT_SUPPORTED
  201.   APTR CachePreDMA(struct NOT_SUPPORTED*, APTR address, ULONG *length, unsigned long flags );
  202. #define CachePostDMA CachePostDMA_NOT_SUPPORTED
  203.   void CachePostDMA(struct NOT_SUPPORTED*, APTR address, ULONG *length, unsigned long flags );
  204. #define ObtainQuickVector ObtainQuickVector_NOT_COMPATIBLE
  205.   ULONG ObtainQuickVector(struct NOT_SUPPORTED*, APTR interruptCode );
  206.  
  207. #endif /** __IGNORE_NOT_SUPPORTED__ **/
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215. #ifdef __cplusplus
  216. }
  217. #endif
  218.  
  219. #endif     /* CLIB_EXEC_PROTOS_H */
  220.