home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / at-inc-bin.lha / os-include / clib / exec_protos.h < prev    next >
C/C++ Source or Header  |  1993-10-15  |  9KB  |  180 lines

  1. #ifndef  CLIB_EXEC_PROTOS_H
  2. #define  CLIB_EXEC_PROTOS_H
  3.  
  4. /*
  5. **    $VER: exec_protos.h 39.15 (1.10.93)
  6. **    Includes Release 40.15
  7. **
  8. **    C prototypes. For use with 32 bit integers only.
  9. **
  10. **    (C) Copyright 1990-1993 Commodore-Amiga, Inc.
  11. **        All Rights Reserved
  12. */
  13.  
  14. #ifndef  EXEC_TYPES_H
  15. #include <exec/types.h>
  16. #endif
  17. #ifndef  EXEC_TASKS_H
  18. #include <exec/tasks.h>
  19. #endif
  20. /*------ misc ---------------------------------------------------------*/
  21. ULONG Supervisor( unsigned long (*userFunction)() );
  22. /*------ special patchable hooks to internal exec activity ------------*/
  23. /*------ module creation ----------------------------------------------*/
  24. void InitCode( unsigned long startClass, unsigned long version );
  25. void InitStruct( APTR initTable, APTR memory, unsigned long size );
  26. struct Library *MakeLibrary( APTR funcInit, APTR structInit,
  27.     unsigned long (*libInit)(), unsigned long dataSize,
  28.     unsigned long segList );
  29. void MakeFunctions( APTR target, APTR functionArray,
  30.     unsigned long funcDispBase );
  31. struct Resident *FindResident( UBYTE *name );
  32. APTR InitResident( struct Resident *resident, unsigned long segList );
  33. /*------ diagnostics --------------------------------------------------*/
  34. void Alert( unsigned long alertNum );
  35. void Debug( unsigned long flags );
  36. /*------ interrupts ---------------------------------------------------*/
  37. void Disable( void );
  38. void Enable( void );
  39. void Forbid( void );
  40. void Permit( void );
  41. ULONG SetSR( unsigned long newSR, unsigned long mask );
  42. APTR SuperState( void );
  43. void UserState( APTR sysStack );
  44. struct Interrupt *SetIntVector( long intNumber, struct Interrupt *interrupt );
  45. void AddIntServer( long intNumber, struct Interrupt *interrupt );
  46. void RemIntServer( long intNumber, struct Interrupt *interrupt );
  47. void Cause( struct Interrupt *interrupt );
  48. /*------ memory allocation --------------------------------------------*/
  49. APTR Allocate( struct MemHeader *freeList, unsigned long byteSize );
  50. void Deallocate( struct MemHeader *freeList, APTR memoryBlock,
  51.     unsigned long byteSize );
  52. APTR AllocMem( unsigned long byteSize, unsigned long requirements );
  53. APTR AllocAbs( unsigned long byteSize, APTR location );
  54. void FreeMem( APTR memoryBlock, unsigned long byteSize );
  55. ULONG AvailMem( unsigned long requirements );
  56. struct MemList *AllocEntry( struct MemList *entry );
  57. void FreeEntry( struct MemList *entry );
  58. /*------ lists --------------------------------------------------------*/
  59. void Insert( struct List *list, struct Node *node, struct Node *pred );
  60. void AddHead( struct List *list, struct Node *node );
  61. void AddTail( struct List *list, struct Node *node );
  62. void Remove( struct Node *node );
  63. struct Node *RemHead( struct List *list );
  64. struct Node *RemTail( struct List *list );
  65. void Enqueue( struct List *list, struct Node *node );
  66. struct Node *FindName( struct List *list, UBYTE *name );
  67. /*------ tasks --------------------------------------------------------*/
  68. APTR AddTask( struct Task *task, APTR initPC, APTR finalPC );
  69. void RemTask( struct Task *task );
  70. struct Task *FindTask( UBYTE *name );
  71. BYTE SetTaskPri( struct Task *task, long priority );
  72. ULONG SetSignal( unsigned long newSignals, unsigned long signalSet );
  73. ULONG SetExcept( unsigned long newSignals, unsigned long signalSet );
  74. ULONG Wait( unsigned long signalSet );
  75. void Signal( struct Task *task, unsigned long signalSet );
  76. BYTE AllocSignal( long signalNum );
  77. void FreeSignal( long signalNum );
  78. LONG AllocTrap( long trapNum );
  79. void FreeTrap( long trapNum );
  80. /*------ messages -----------------------------------------------------*/
  81. void AddPort( struct MsgPort *port );
  82. void RemPort( struct MsgPort *port );
  83. void PutMsg( struct MsgPort *port, struct Message *message );
  84. struct Message *GetMsg( struct MsgPort *port );
  85. void ReplyMsg( struct Message *message );
  86. struct Message *WaitPort( struct MsgPort *port );
  87. struct MsgPort *FindPort( UBYTE *name );
  88. /*------ libraries ----------------------------------------------------*/
  89. void AddLibrary( struct Library *library );
  90. void RemLibrary( struct Library *library );
  91. struct Library *OldOpenLibrary( UBYTE *libName );
  92. void CloseLibrary( struct Library *library );
  93. APTR SetFunction( struct Library *library, long funcOffset,
  94.     unsigned long (*newFunction)() );
  95. void SumLibrary( struct Library *library );
  96. /*------ devices ------------------------------------------------------*/
  97. void AddDevice( struct Device *device );
  98. void RemDevice( struct Device *device );
  99. BYTE OpenDevice( UBYTE *devName, unsigned long unit,
  100.     struct IORequest *ioRequest, unsigned long flags );
  101. void CloseDevice( struct IORequest *ioRequest );
  102. BYTE DoIO( struct IORequest *ioRequest );
  103. void SendIO( struct IORequest *ioRequest );
  104. struct IORequest *CheckIO( struct IORequest *ioRequest );
  105. BYTE WaitIO( struct IORequest *ioRequest );
  106. void AbortIO( struct IORequest *ioRequest );
  107. /*------ resources ----------------------------------------------------*/
  108. void AddResource( APTR resource );
  109. void RemResource( APTR resource );
  110. APTR OpenResource( UBYTE *resName );
  111. /*------ private diagnostic support -----------------------------------*/
  112. /*------ misc ---------------------------------------------------------*/
  113. APTR RawDoFmt( UBYTE *formatString, APTR dataStream, void (*putChProc)(),
  114.     APTR putChData );
  115. ULONG GetCC( void );
  116. ULONG TypeOfMem( APTR address );
  117. ULONG Procure( struct SignalSemaphore *sigSem,
  118.     struct SemaphoreMessage *bidMsg );
  119. void Vacate( struct SignalSemaphore *sigSem,
  120.     struct SemaphoreMessage *bidMsg );
  121. struct Library *OpenLibrary( UBYTE *libName, unsigned long version );
  122. /*--- functions in V33 or higher (Release 1.2) ---*/
  123. /*------ signal semaphores (note funny registers)----------------------*/
  124. void InitSemaphore( struct SignalSemaphore *sigSem );
  125. void ObtainSemaphore( struct SignalSemaphore *sigSem );
  126. void ReleaseSemaphore( struct SignalSemaphore *sigSem );
  127. ULONG AttemptSemaphore( struct SignalSemaphore *sigSem );
  128. void ObtainSemaphoreList( struct List *sigSem );
  129. void ReleaseSemaphoreList( struct List *sigSem );
  130. struct SignalSemaphore *FindSemaphore( UBYTE *sigSem );
  131. void AddSemaphore( struct SignalSemaphore *sigSem );
  132. void RemSemaphore( struct SignalSemaphore *sigSem );
  133. /*------ kickmem support ----------------------------------------------*/
  134. ULONG SumKickData( void );
  135. /*------ more memory support ------------------------------------------*/
  136. void AddMemList( unsigned long size, unsigned long attributes, long pri,
  137.     APTR base, UBYTE *name );
  138. void CopyMem( APTR source, APTR dest, unsigned long size );
  139. void CopyMemQuick( APTR source, APTR dest, unsigned long size );
  140. /*------ cache --------------------------------------------------------*/
  141. /*--- functions in V36 or higher (Release 2.0) ---*/
  142. void CacheClearU( void );
  143. void CacheClearE( APTR address, unsigned long length, unsigned long caches );
  144. ULONG CacheControl( unsigned long cacheBits, unsigned long cacheMask );
  145. /*------ misc ---------------------------------------------------------*/
  146. APTR CreateIORequest( struct MsgPort *port, unsigned long size );
  147. void DeleteIORequest( APTR iorequest );
  148. struct MsgPort *CreateMsgPort( void );
  149. void DeleteMsgPort( struct MsgPort *port );
  150. void ObtainSemaphoreShared( struct SignalSemaphore *sigSem );
  151. /*------ even more memory support -------------------------------------*/
  152. APTR AllocVec( unsigned long byteSize, unsigned long requirements );
  153. void FreeVec( APTR memoryBlock );
  154. /*------ V39 Pool LVOs...*/
  155. APTR CreatePool( unsigned long requirements, unsigned long puddleSize,
  156.     unsigned long threshSize );
  157. void DeletePool( APTR poolHeader );
  158. APTR AllocPooled( APTR poolHeader, unsigned long memSize );
  159. void FreePooled( APTR poolHeader, APTR memory, unsigned long memSize );
  160. /*------ misc ---------------------------------------------------------*/
  161. ULONG AttemptSemaphoreShared( struct SignalSemaphore *sigSem );
  162. void ColdReboot( void );
  163. void StackSwap( struct StackSwapStruct *newStack );
  164. /*------ task trees ---------------------------------------------------*/
  165. void ChildFree( APTR tid );
  166. void ChildOrphan( APTR tid );
  167. void ChildStatus( APTR tid );
  168. void ChildWait( APTR tid );
  169. /*------ future expansion ---------------------------------------------*/
  170. APTR CachePreDMA( APTR address, ULONG *length, unsigned long flags );
  171. void CachePostDMA( APTR address, ULONG *length, unsigned long flags );
  172. /*------ New, for V39*/
  173. /*--- functions in V39 or higher (Release 3) ---*/
  174. /*------ Low memory handler functions*/
  175. void AddMemHandler( struct Interrupt *memhand );
  176. void RemMemHandler( struct Interrupt *memhand );
  177. /*------ Function to attempt to obtain a Quick Interrupt Vector...*/
  178. ULONG ObtainQuickVector( APTR interruptCode );
  179. #endif     /* CLIB_EXEC_PROTOS_H */
  180.