home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 2 / FFMCD02.bin / useful / os-include / clib / exec_protos.h < prev    next >
C/C++ Source or Header  |  1992-09-24  |  9KB  |  176 lines

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