home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 15 / AACD15.ISO / AACD / Programming / advlite / Docs / autodocs / powerpcdoc.lha / powerpc.doc
Encoding:
Text File  |  1999-10-19  |  141.0 KB  |  4,226 lines

  1. TABLE OF CONTENTS
  2.  
  3. powerpc.library/AllocVec32
  4. powerpc.library/AllocXMsg
  5. powerpc.library/CausePPCInterrupt
  6. powerpc.library/CreatePPCTask
  7. powerpc.library/FreeVec32
  8. powerpc.library/FreeXMsg
  9. powerpc.library/GetCPU
  10. powerpc.library/GetPPCState
  11. powerpc.library/PowerDebugMode
  12. powerpc.library/PutXMsg
  13. powerpc.library/RunPPC
  14. powerpc.library/SetCache68K
  15. powerpc.library/SPrintF68K
  16. powerpc.library/WaitForPPC
  17.  
  18. powerpc.library/AddHeadPPC
  19. powerpc.library/AddPortPPC
  20. powerpc.library/AddSemaphorePPC
  21. powerpc.library/AddTailPPC
  22. powerpc.library/AddTimePPC
  23. powerpc.library/AllocPooledPPC
  24. powerpc.library/AllocSignalPPC
  25. powerpc.library/AllocVecPPC
  26. powerpc.library/AllocXMsgPPC
  27. powerpc.library/AttemptSemaphorePPC
  28. powerpc.library/AttemptSemaphoreSharedPPC
  29. powerpc.library/CauseInterrupt
  30. powerpc.library/ChangeMMU
  31. powerpc.library/ClearExcMMU
  32. powerpc.library/CmpTimePPC
  33. powerpc.library/CopyMemPPC
  34. powerpc.library/CreateMsgPortPPC
  35. powerpc.library/CreatePoolPPC
  36. powerpc.library/CreateTaskPPC
  37. powerpc.library/DeleteMsgPortPPC
  38. powerpc.library/DeletePoolPPC
  39. powerpc.library/DeleteTaskPPC
  40. powerpc.library/EndSnoopTask
  41. powerpc.library/EnqueuePPC
  42. powerpc.library/FindNamePPC
  43. powerpc.library/FindPortPPC
  44. powerpc.library/FindSemaphorePPC
  45. powerpc.library/FindTagItemPPC
  46. powerpc.library/FindTaskByID
  47. powerpc.library/FindTaskPPC
  48. powerpc.library/FreeAllMem
  49. powerpc.library/FreePooledPPC
  50. powerpc.library/FreeSemaphorePPC
  51. powerpc.library/FreeSignalPPC
  52. powerpc.library/FreeVecPPC
  53. powerpc.library/FreeXMsgPPC
  54. powerpc.library/GetHALInfo
  55. powerpc.library/GetInfo
  56. powerpc.library/GetMsgPPC
  57. powerpc.library/GetSysTimePPC
  58. powerpc.library/GetTagDataPPC
  59. powerpc.library/GetTaskByID
  60. powerpc.library/InitSemaphorePPC
  61. powerpc.library/InsertPPC
  62. powerpc.library/LockTaskList
  63. powerpc.library/ModifyFPExc
  64. powerpc.library/NewListPPC
  65. powerpc.library/NextTagItemPPC
  66. powerpc.library/ObtainSemaphorePPC
  67. powerpc.library/ObtainSemaphoreSharedPPC
  68. powerpc.library/ProcurePPC
  69. powerpc.library/PutMsgPPC
  70. powerpc.library/PutXMsgPPC
  71. powerpc.library/RawDoFmtPPC
  72. powerpc.library/ReleaseSemaphorePPC
  73. powerpc.library/RemExcHandler
  74. powerpc.library/RemHeadPPC
  75. powerpc.library/RemovePPC
  76. powerpc.library/RemPortPPC
  77. powerpc.library/RemTailPPC
  78. powerpc.library/RemSemaphorePPC
  79. powerpc.library/ReplyMsgPPC
  80. powerpc.library/Run68K
  81. powerpc.library/SetCache
  82. powerpc.library/SetExceptPPC
  83. powerpc.library/SetExcHandler
  84. powerpc.library/SetExcMMU
  85. powerpc.library/SetHardware
  86. powerpc.library/SetNiceValue
  87. powerpc.library/SetReplyPortPPC
  88. powerpc.library/SetScheduling
  89. powerpc.library/SetSignalPPC
  90. powerpc.library/SetTaskPriPPC
  91. powerpc.library/Signal68K
  92. powerpc.library/SignalPPC
  93. powerpc.library/SnoopTask
  94. powerpc.library/SPrintF
  95. powerpc.library/SubTimePPC
  96. powerpc.library/Super
  97. powerpc.library/TrySemaphorePPC
  98. powerpc.library/UnLockTaskList
  99. powerpc.library/User
  100. powerpc.library/VacatePPC
  101. powerpc.library/WaitFor68K
  102. powerpc.library/WaitPortPPC
  103. powerpc.library/WaitPPC
  104. powerpc.library/WaitTime
  105.  
  106. powerpc.library/AllocVec32                          powerpc.library/AllocVec32
  107.  
  108.     NAME
  109.         AllocVec32 - allocates memory which is correctly aligned (V7)
  110.  
  111.     CPU
  112.         680x0
  113.  
  114.     SYNOPSIS
  115.         memblock = AllocVec32(memsize, attributes)
  116.         d0                    d0       d1
  117.  
  118.         void *AllocVec32(ULONG, ULONG);
  119.  
  120.     FUNCTION
  121.         This function allocates memory via exec/AllocVec and aligns the
  122.         memory block properly, so that this memory block can be shared
  123.         with PPC tasks. The minimal alignment of the memory block is 32.
  124.  
  125.     INPUTS
  126.         memsize - size of memory to be allocated
  127.         attributes - the desired memory attributes (see exec/AllocMem for
  128.                      a description of these attributes)
  129.  
  130.     RESULT
  131.         memblock - The address of the allocated memory block
  132.  
  133.     NOTES
  134.         Memory blocks allocated with 'AllocVec32' must be freed using
  135.         'FreeVec32'.
  136.  
  137.     SEE ALSO
  138.         FreeVec32, exec/AllocMem
  139.  
  140. powerpc.library/AllocXMsg                            powerpc.library/AllocXMsg
  141.  
  142.     NAME
  143.         AllocXMsg - allocates a message for Inter-CPU communication (V12)
  144.  
  145.     CPU
  146.         680x0
  147.  
  148.     SYNOPSIS
  149.         message = AllocXMsg(bodysize, replyport)
  150.         d0                  d0        a0
  151.  
  152.         struct Message *AllocXMsg(ULONG, struct MsgPort *);
  153.  
  154.     FUNCTION
  155.         This function allocates memory for a message which can be used
  156.         for Inter-CPU communication. Some fields of the message are
  157.         initialized.
  158.         After this function was called, the message body must be
  159.         created before sending this message.
  160.  
  161.     INPUTS
  162.         bodysize - the size of the message body (max. 65535-MN_SIZE)
  163.         replyport - the reply port
  164.  
  165.     RESULT
  166.         message - The address of an initialized message (except for
  167.                   the message body, which must be initialized by the
  168.                   programmer).
  169.  
  170.     NOTES
  171.         Calling this function is the only way allowed to create a
  172.         message which can be sent to a PPC task.
  173.  
  174.         A message allocated with 'AllocXMsg' should be freed using
  175.         'FreeXMsg' if it is not used anymore. Since V14, it is
  176.         allowed to free the messsage using 'FreeXMsgPPC' on the
  177.         PPC side (which is internally done using a cross call).
  178.  
  179.         An Inter-CPU message must be sent with 'PutXMsg' to a PPC
  180.         task.
  181.  
  182.         It is possible not to specify a replyport (simply set
  183.         replyport to NULL).
  184.  
  185.         If you want to be compatible to earlier versions, you
  186.         shouldn't free InterCPU messages by the foreign task.
  187.  
  188.     SEE ALSO
  189.         FreeXMsg, PutXMsg
  190.  
  191. powerpc.library/CausePPCInterrupt            powerpc.library/CausePPCInterrupt
  192.  
  193.     NAME
  194.         CausePPCInterrupt - invokes all interrupt handlers on PPC side (V15)
  195.  
  196.     CPU
  197.         680x0
  198.  
  199.     SYNOPSIS
  200.         CausePPCInterrupt()
  201.  
  202.         void CausePPCInterrupt();
  203.  
  204.     FUNCTION
  205.         Invokes all PPC interrupt handlers, which were added using
  206.         SetExcHandler and an exception ID = EXCF_INTERRUPT.
  207.  
  208.     NOTES
  209.         This function allows to run PPC code very quickly from the
  210.         68K side, much faster than through a regular PPC call. WarpOS
  211.         does not enforce any kind of cache consistency for such an
  212.         operation. Don't use this function, except if you know exactly
  213.         what you are doing.
  214.  
  215.     SEE ALSO
  216.         CauseInterrupt
  217.  
  218. powerpc.library/CreatePPCTask                    powerpc.library/CreatePPCTask
  219.  
  220.     NAME
  221.         CreatePPCTask - creates a new PPC task (V15)
  222.  
  223.     CPU
  224.         680x0
  225.  
  226.     SYNOPSIS
  227.         TaskPPC = CreatePPCTask(TagItems)
  228.         d0                      a0
  229.  
  230.         struct TaskPPC *CreatePPCTask(struct TagItem *);
  231.  
  232.     FUNCTION
  233.         This function creates a new PPC task under control of the tags passed.
  234.         All memory (inclusive stack) is allocated automatically.
  235.  
  236.         This function does nothing else then calling powerpc/CreateTaskPPC
  237.         through a context switch. It is a convenience function.
  238.  
  239.     INPUTS
  240.         TagItems - pointer to a tagitem array. Refer to the documentation
  241.                    of CreateTaskPPC for a description of all supported tags.
  242.  
  243.     RESULT
  244.         TaskPPC - pointer to a TaskPPC structure or NULL for failure
  245.  
  246.     NOTES
  247.         See powerpc/CreateTaskPPC
  248.  
  249.     SEE ALSO
  250.         CreateTaskPPC, powerpc/tasksPPC.i
  251.  
  252. powerpc.library/FreeVec32                            powerpc.library/FreeVec32
  253.  
  254.     NAME
  255.         FreeVec32 - frees memory allocated with 'AllocVec32' (V7)
  256.  
  257.     CPU
  258.         680x0
  259.  
  260.     SYNOPSIS
  261.         FreeVec32(memblock)
  262.                   a1
  263.  
  264.         void FreeVec32(void *);
  265.  
  266.     FUNCTION
  267.         This function frees a memory block which was allocated using
  268.         'AllocVec32'.
  269.  
  270.     INPUTS
  271.         memblock - The address of the allocated memory block
  272.  
  273.     SEE ALSO
  274.         AllocVec32
  275.  
  276. powerpc.library/FreeXMsg                              powerpc.library/FreeXMsg
  277.  
  278.     NAME
  279.         FreeXMsg - frees a message allocated with 'AllocXMsg' (V12)
  280.  
  281.     CPU
  282.         680x0
  283.  
  284.     SYNOPSIS
  285.         FreeXMsg(message)
  286.                  a0
  287.  
  288.         void FreeXMsg(struct Message *);
  289.  
  290.     FUNCTION
  291.         This function frees a memory allocated using 'AllocXMsg'.
  292.  
  293.     INPUTS
  294.         message - a message allocated by 'AllocXMsg'.
  295.  
  296.     NOTES
  297.         There were some restrictions in earlier versions using
  298.         FreeXMsg. Since V14, a XMessage created by AllocXMsg can be
  299.         freed either by another 68K task (if the message isn't used
  300.         anymore) or by a PPC task using FreeXMsgPPC.
  301.  
  302.     SEE ALSO
  303.         AllocXMsg, PutXMsg
  304.  
  305. powerpc.library/GetCPU                                  powerpc.library/GetCPU
  306.  
  307.     NAME
  308.         GetCPU - gets the PowerPC CPU type (V7)
  309.  
  310.     CPU
  311.         680x0
  312.  
  313.     SYNOPSIS
  314.         CPUType = GetCPU
  315.         d0
  316.  
  317.         ULONG GetCPU (void);
  318.  
  319.     FUNCTION
  320.         This function reads the PowerPC CPU type. A longword is returned with
  321.         one specific bit set (see the include file 'powerpc/powerpc.i' for a
  322.         description of the different CPU types)
  323.  
  324.     RESULT
  325.         CPUType - A longword with one specific bit set.
  326.  
  327. powerpc.library/GetPPCState                        powerpc.library/GetPPCState
  328.  
  329.     NAME
  330.         GetPPCState - returns the state of the PPC and PPC applications (V13)
  331.  
  332.     CPU
  333.         680x0
  334.  
  335.     SYNOPSIS
  336.         PPCState = GetPPCState
  337.         d0
  338.  
  339.         ULONG GetPPCState (void);
  340.  
  341.     FUNCTION
  342.         This function returns the current state of the PPC processor and
  343.         the state of custom applications. A bitmask is returned with the
  344.         values defined in 'powerpc.i'.
  345.  
  346.     RESULT
  347.         PPCState - A bitmask. The following bits are supported (the
  348.                    description is valid if the bit is 1):
  349.  
  350.                    PPCSTATEF_POWERSAVE  - PPC is currently in power save mode.
  351.                    PPCSTATEF_APPACTIVE  - PPC application tasks are currently
  352.                                         - active resp. installed in the system.
  353.                    PPCSTATEF_APPRUNNING - At least one PPC application task is
  354.                                           ready or running.
  355.  
  356. powerpc.library/PowerDebugMode                  powerpc.library/PowerDebugMode
  357.  
  358.     NAME
  359.         PowerDebugMode - sets the level of debugging output (V7)
  360.  
  361.     CPU
  362.         680x0
  363.  
  364.     SYNOPSIS
  365.         PowerDebugMode (debuglevel)
  366.                         d0
  367.  
  368.         void PowerDebugMode (ULONG);
  369.  
  370.     FUNCTION
  371.         The powerpc.library has a built-in debugging system which prints out
  372.         many informations to the serial port. The main purpose of this
  373.         function is to improve the maintenance of this library. If problems
  374.         occur with the powerpc.library then it will help the author of this
  375.         library a lot to fix the problems. Try to reproduce the problems with
  376.         debugging output enabled and send the debugging output to the author.
  377.         Use a program which captures the data transferred to the serial port
  378.         (for example Sushi) to save the debugging output.
  379.  
  380.     INPUTS
  381.         debuglevel - Debugging level (0-3). All other values are ignored.
  382.                      The higher the debugging level, the larger the debugging
  383.                      output. 0 means no debugging output.
  384.  
  385.     NOTES
  386.         The powerpc.library operates with debugging level 0 by default (no
  387.         debugging output). You can change the default value with the
  388.         environment variable 'powerpc/debug' (set values from 0 to 3).
  389.  
  390. powerpc.library/PutXMsg                                powerpc.library/PutXMsg
  391.  
  392.     NAME
  393.         PutXMsg - sends an Inter-CPU message to a PPC task (V12)
  394.  
  395.     CPU
  396.         680x0
  397.  
  398.     SYNOPSIS
  399.         PutXMsg(MsgPortPPC, message)
  400.                 a0          a1
  401.  
  402.         void PutXMsg(struct MsgPortPPC *, struct Message *);
  403.  
  404.     FUNCTION
  405.         This function sends an Inter-CPU message allocated by 'AllocXMsg'
  406.         to a PPC task.
  407.  
  408.     INPUTS
  409.         MsgPortPPC - a PPC message port
  410.         message - a message allocated by 'AllocXMsg'.
  411.  
  412.     NOTES
  413.         Inter-CPU must NOT be used for internal communication. They can
  414.         only be used for communication between tasks on different processors.
  415.  
  416.         Inter-CPU messages get a different node type, if they are
  417.         sent. If you want to filter out Reply-Messages from standard
  418.         or Inter-CPU messages, compare the LN_TYPE field to NT_REPLYMSG.
  419.         Replied Inter-CPU messages still get the same node type
  420.         (NT_REPLYMSG). Any assumptions about the value of the new
  421.         node type are ILLEGAL!!
  422.  
  423.         As soon as an Inter-CPU message is sent, the 68K looses ownership
  424.         over the message. No access to the message is allowed until the
  425.         reply has been arrived. If no replyport was specified, it's
  426.         allowed to free the message, after it was read from the other side.
  427.  
  428.         Inter-CPU messages can be reused if they have been replied.
  429.  
  430.         Inter-CPU messages are read and replied using the standard
  431.         message handling mechanisms (exec/WaitPort,exec/GetMsg,exec/ReplyMsg
  432.         for 68K, powerpc/WaitPortPPC, powerpc/GetMsgPPC, powerpc/ReplyMsgPPC
  433.         for PPC).
  434.  
  435.         Don't call exec/ReplyMsg with an InterCPU-Message without
  436.         Replyport (versions less than V12.2 crashed).
  437.  
  438.         The receiving task must NOT access message data, which are not
  439.         explicitely located in the message body (for example data which is
  440.         referenced by a pointer) unless both tasks care for the cache
  441.         consistency. Only the message itself is flushed/invalidated
  442.         automatically by the system.
  443.  
  444.         The receiving task may write to the message body of an Inter-CPU
  445.         message.
  446.  
  447.     SEE ALSO
  448.         AllocXMsg, FreeXMsg
  449.  
  450. powerpc.library/RunPPC                                  powerpc.library/RunPPC
  451.  
  452.     NAME
  453.         RunPPC - runs a PowerPC function (V7)
  454.  
  455.     CPU
  456.         680x0
  457.  
  458.     SYNOPSIS
  459.         status = RunPPC(PPStruct)
  460.         d0              a0
  461.  
  462.         LONG RunPPC (struct PowerPC *);
  463.  
  464.     FUNCTION
  465.         Runs a PowerPC function. A mirror PPC process is created. All
  466.         registers can be transferred to PPC as well as parameters on
  467.         stack. All cache management actions are handled automatically.
  468.  
  469.         All registers are transferred back from PPC after the PPC call
  470.         is completed. They are stored in the PowerPC structure.
  471.  
  472.         The register assignment is as follows:
  473.  
  474.         d0      <->     r3              fp0     <->     f1
  475.         d1      <->     r4              fp1     <->     f2
  476.         d2      <->     r22             fp2     <->     f3
  477.         d3      <->     r23             fp3     <->     f4
  478.         d4      <->     r24             fp4     <->     f5
  479.         d5      <->     r25             fp5     <->     f6
  480.         d6      <->     r26             fp6     <->     f7
  481.         d7      <->     r27             fp7     <->     f8
  482.         a0      <->     r5
  483.         a1      <->     r6
  484.         a2      <->     r28
  485.         a3      <->     r29
  486.         a4      <->     r2
  487.         a5      <->     r30
  488.         a6      <->     r31
  489.  
  490.         Please note, that these registers are NOT transferred directly but
  491.         in the register array mentioned above (PP_REGS).
  492.  
  493.         Here follows another table from the PPC's point of view:
  494.  
  495.         PPC-Register:                   Index into the register array:
  496.         ---------------------------------------------------------------
  497.         Base register:
  498.         r2                              12
  499.  
  500.         Scratch registers:
  501.         r3                              0
  502.         r4                              1
  503.         r5                              8
  504.         r6                              9
  505.  
  506.         Nonvolatile registers:
  507.         r22                             2
  508.         r23                             3
  509.         r24                             4
  510.         r25                             5
  511.         r26                             6
  512.         r27                             7
  513.         r28                             10
  514.         r29                             11
  515.         r30                             13
  516.         r31                             14
  517.  
  518.         New for V15: if the flag PP_LINEAR is given, then the values
  519.         at the indexes 0-7 map to the registers r3-r10. The mapping
  520.         for the FP values remains the same.
  521.  
  522. INPUTS
  523.         PPStruct - Pointer to an initialized PowerPC Structure
  524.  
  525.           PP_CODE       : Pointer to the PowerPC code
  526.           PP_OFFSET     : Not used until V12.2 of powerpc.library. From
  527.                           V12.3 on, the PP_OFFSET field is used just like
  528.                           at Run68K. If PP_OFFSET is zero, than the code
  529.                           pointed to by PP_CODE is executed, if PP_OFFSET
  530.                           is not zero, a PPC library function is executed
  531.                           with PP_CODE containing the library base and
  532.                           PP_OFFSET containing the library vector offset.
  533.           PP_FLAGS      : Flags which can be ore'd together
  534.           - PP[F/B]_ASYNC   : Call PPC function asynchronely (68K process
  535.                               returns immediately)
  536.           - PP[F/B]_LINEAR  : Map the values at indexes 0-7 to the registers
  537.                               r3-r10 (V15)
  538.           - PP[F/B]_THROW   : Cause an exception before the function is executed.
  539.                               The exception is a program exception (trap), which
  540.                               can be caught using appropriate exception handlers.
  541.                               The register r0 contains the string 'WARP', when
  542.                               the exception is triggered, which should give the
  543.                               exception handler the possibility to distinguish
  544.                               between normal exceptions and exceptions triggered
  545.                               using this mechanism (V15)
  546.           PP_STACKPTR   : Pointer to the arguments on the stack to be
  547.                           transferred. The pointer must point directly
  548.                           to the first argument, not to the return address!
  549.                           If no arguments on stack should be transferred,
  550.                           set this to zero.
  551.           PP_STACKSIZE  : Size of the stack area to be transferred. If no
  552.                           stack parameters should be transferred, set this
  553.                           to zero.
  554.           PP_REGS       : Array of longwords where the registers to be
  555.                           transferred can be stored (d0-a6). Please see
  556.                           above for the exact placement of these registers.
  557.           PP_FREGS      : Array of quadwords (8 bytes) where the FP-registers
  558.                           to be transferred can be stored (fp0-fp7). fp0 is
  559.                           at offset 0, fp1 at offset 8 etc.
  560.  
  561.     RESULT
  562.         status - PPERR_SUCCESS if the call was successfully
  563.                  PPERR_ASYNCERR if a synchrone PPC call was made after an
  564.                                 asynchrone PPC call
  565.  
  566.     NOTES
  567.         Calling a PPC function asynchronely is dangerous. Take care of
  568.         possible cache conflicts. Avoid calling system functions as much
  569.         as possible.
  570.  
  571.         If an asynchrone PPC call is done, the function WaitForPPC MUST be
  572.         called ONCE after the call was done. No other PPC call is allowed
  573.         for this 68K process after an asynchrone PPC call and before a call
  574.         to WaitForPPC.
  575.  
  576.         If an asynchronely called PPC function performs a 68K call, the call
  577.         is only performed when WaitForPPC is called by the 68K process. Note
  578.         that the PPC mirror process is still connected to the calling 68K
  579.         process.
  580.  
  581.         DON'T pass arguments on stack when calling a PPC function asynchronely.
  582.         The stack is most likely to be trashed before it is copied to the PPC
  583.         stack.
  584.  
  585.         Assembler programmers should use the macros RUNPOWERPC and
  586.         RUNPOWERPC_XL located in the include file 'powerpc/powerpc.i'
  587.  
  588.     SEE ALSO
  589.         WaitForPPC,powerpc/powerpc.i
  590.  
  591. powerpc.library/SetCache68K                        powerpc.library/SetCache68K
  592.  
  593.     NAME
  594.         SetCache68K - cache manipulation function (V15)
  595.  
  596.     CPU
  597.         680x0
  598.  
  599.     SYNOPSIS
  600.         SetCache68K(cacheflags, start, length)
  601.                     d0          a0     d1
  602.  
  603.         void SetCache68K(ULONG, void *, ULONG);
  604.  
  605.     FUNCTION
  606.         This function offers many possibilities to affect the caches of
  607.         the 68K. It performs the action defined by the cache flags. Only
  608.         one action can be performed at the same time.
  609.  
  610.     INPUTS
  611.         cacheflags - action to be performed:
  612.             CACHE_DCACHEOFF:    Data cache is disabled. The Cache is flushed
  613.                                 automatically.
  614.             CACHE_DCACHEON:     Data cache is enabled.
  615.             CACHE_DCACHEFLUSH:  Data cache is flushed.
  616.             CACHE_ICACHEOFF:    Instruction cache is disabled.
  617.             CACHE_ICACHEON:     Instruction cache is enabled.
  618.             CACHE_ICACHEINV:    Instruction cache is invalidated.
  619.             CACHE_DCACHEINV:    Data cache is invalidated
  620.  
  621.         start - pointer to the start address of the area to be affected.
  622.                 The following cacheflags support an area specification:
  623.                 CACHE_DCACHEFLUSH, CACHE_ICACHEINV, CACHE_DCACHEINV
  624.  
  625.                 if 'start' is 0 the whole address space is affected
  626.  
  627.         length - length of the area to be affected (see above for the
  628.                  cache flags which support area specification).
  629.                  if 'length' is 0 the whole address space is affected
  630.  
  631.     NOTES
  632.         Invalidating the whole instruction cache is much more efficient
  633.         than flushing only a part of it.
  634.  
  635.         Flushing the whole data cache is less efficient than flushing
  636.         a specific area, if this area is not too large.
  637.  
  638.         The caches should not be switched on/off resp. locked/unlocked
  639.         without GOOD justification. Global manipulations of the cache
  640.         should be avoided.
  641.  
  642.         Never use CACHE_DCACHEINV, except if you are completely aware of
  643.         the consequences of your doing.
  644.  
  645.     SEE ALSO
  646.         powerpc/powerpc.i
  647.  
  648. powerpc.library/SPrintF68K                          powerpc.library/SPrintF68K
  649.  
  650.     NAME
  651.         SPrintF68K - prints a formatted string to the serial port (V7)
  652.  
  653.     CPU
  654.         680x0
  655.  
  656.     SYNOPSIS
  657.         SPrintF68K (Formatstring, values )
  658.                     a0            a1
  659.  
  660.         void SPrintF68K (STRPTR, APTR);
  661.  
  662.     FUNCTION
  663.         Prints a formatted string to the serial port using the AMIGA-OS
  664.         functions 'exec/RawPutChar' and 'exec/RawDoFmt'. Can be used to add
  665.         debugging features and to improve the maintenance of software.
  666.  
  667.     INPUTS
  668.         Formatstring - A C style string with % commands to indicate where
  669.                        parameters have to be inserted (see 'exec/RawDoFmt'
  670.                        for a detailed description of these commands).
  671.         values - A pointer to an array of parameters to be inserted into
  672.                  specified places in the string.
  673.  
  674.     SEE ALSO
  675.         exec/RawDoFmt
  676.  
  677. powerpc.library/WaitForPPC                          powerpc.library/WaitForPPC
  678.  
  679.     NAME
  680.         WaitForPPC - waits for the completion of an asynchrone PPC call (V7)
  681.  
  682.     CPU
  683.         680x0
  684.  
  685.     SYNOPSIS
  686.         status = WaitForPPC(PPStruct)
  687.         d0                  a0
  688.  
  689.         LONG WaitForPPC (struct PowerPC *);
  690.  
  691.     FUNCTION
  692.         After an asynchrone PPC call was done (see RunPPC) this function must
  693.         be called to wait for the completion of the PowerPC function. All
  694.         registers transferred to the PowerPC with RunPPC are returned into the
  695.         PowerPC Structure.
  696.  
  697.     INPUTS
  698.         PPStruct - Pointer to a PowerPC Structure (see RunPPC for a description
  699.                    of the elements). The structure has not to be initialized.
  700.                    The structure must be transferred to hold the returned
  701.                    registers by the PPC function.
  702.  
  703.     RESULT
  704.         status - PPERR_SUCCESS if the call was successfully
  705.                  PPERR_WAITERR if WaitForPPC is called after a synchrone PPC
  706.                                call.
  707.  
  708.     NOTES
  709.         Assembler programmers should use the macros WAITFORPPC and
  710.         WAITFORPPC_XL located in the include file 'powerpc/powerpc.i'
  711.  
  712.     SEE ALSO
  713.         RunPPC,powerpc/powerpc.i
  714.  
  715. powerpc.library/AddHeadPPC                          powerpc.library/AddHeadPPC
  716.  
  717.     NAME
  718.         AddHeadPPC - insert a node at the head of a list (V8)
  719.  
  720.     CPU
  721.         PowerPC
  722.  
  723.     SYNOPSIS
  724.         AddHeadPPC(_PowerPCBase, list, node)
  725.                    r3            r4    r5
  726.  
  727.         void AddHeadPPC(struct Library *, struct List*, struct Node*);
  728.  
  729.     FUNCTION
  730.         Insert a node to the head of a standard exec list. This is the
  731.         mirror function of exec/AddHead.
  732.  
  733.     INPUTS
  734.         _PowerPCBase - base of powerpc.library (can be omitted)
  735.         list - a pointer to the target list
  736.         node - the node to insert
  737.  
  738.     NOTES
  739.         This function is guaranteed to work correctly, if the PowerPCBase
  740.         is not passed in r3.
  741.  
  742.         Assembler programmers may use the macro _ADDHEAD located in
  743.         'powerpc/listsPPC.i'
  744.  
  745.         This function is safe to call from exception handlers.
  746.  
  747.     SEE ALSO
  748.         InsertPPC, AddTailPPC, RemovePPC, RemHeadPPC, RemTailPPC,
  749.         EnqueuePPC, FindNamePPC, NewListPPC, powerpc/listsPPC.i
  750.  
  751. powerpc.library/AddPortPPC                          powerpc.library/AddPortPPC
  752.  
  753.     NAME
  754.         AddPortPPC - adds a public PPC message port to the system (V11)
  755.  
  756.     CPU
  757.         PowerPC
  758.  
  759.     SYNOPSIS
  760.         AddPortPPC(_PowerPCBase, MsgPortPPC)
  761.                    r3            r4
  762.  
  763.         void AddPortPPC(struct Library *, struct MsgPortPPC *);
  764.  
  765.     FUNCTION
  766.         This function adds a PPC message port to a public list of ports.
  767.         The message port should be named and the priority field should
  768.         be set. A public message port can be found by name using
  769.         'FindPortPPC'. This is the mirror function of exec/AddPort.
  770.  
  771.     INPUTS
  772.         _PowerPCBase - base of powerpc.library
  773.         MsgPortPPC - pointer to a PPC message port. It's safe to pass a
  774.                      NULL parameter.
  775.  
  776.     SEE ALSO
  777.         CreateMsgPortPPC,DeleteMsgPortPPC,FindPortPPC,RemPortPPC
  778.         powerpc/portsPPC.i
  779.  
  780. powerpc.library/AddSemaphorePPC                powerpc.library/AddSemaphorePPC
  781.  
  782.     NAME
  783.         AddSemaphorePPC - initializes a global signal semaphore (V8)
  784.  
  785.     CPU
  786.         PowerPC
  787.  
  788.     SYNOPSIS
  789.         status = AddSemaphorePPC(_PowerPCBase, SignalSemaphorePPC)
  790.         r3                        r3            r4
  791.  
  792.         LONG AddSemaphorePPC(struct Library *, struct SignalSemaphorePPC *);
  793.  
  794.     FUNCTION
  795.         Initializes a signal semaphore and adds it to the public semaphore
  796.         list. This is the mirror function of exec/AddSemaphore.
  797.  
  798.     INPUTS
  799.         _PowerPCBase - base of powerpc.library
  800.         SignalSemaphorePPC - pointer to a signalsemaphorePPC structure
  801.                              (a semaphore name should be specified)
  802.  
  803.     RESULT
  804.         status - status value:
  805.             SSPPC_SUCCESS: function was successful
  806.             SSPPC_NOMEM: function failed due to lack of memory
  807.  
  808.     SEE ALSO
  809.         InitSemaphorePPC, FreeSemaphorePPC, ObtainSemaphorePPC,
  810.         AttemptSemaphorePPC, ReleaseSemaphorePPC, RemSemaphorePPC,
  811.         FindSemaphorePPC, TrySemaphorePPC, powerpc/semaphoresPPC.i
  812.  
  813. powerpc.library/AddTailPPC                          powerpc.library/AddTailPPC
  814.  
  815.     NAME
  816.         AddTailPPC - insert a node at the tail of a list (V8)
  817.  
  818.     CPU
  819.         PowerPC
  820.  
  821.     SYNOPSIS
  822.         AddTailPPC(_PowerPCBase, list, node)
  823.                    r3            r4    r5
  824.  
  825.         void AddTailPPC(struct Library *, struct List*, struct Node*);
  826.  
  827.     FUNCTION
  828.         Insert a node to the tail of a standard exec list. This is the
  829.         mirror function of exec/AddTail.
  830.  
  831.     INPUTS
  832.         _PowerPCBase - base of powerpc.library (can be omitted)
  833.         list - a pointer to the target list
  834.         node - the node to insert
  835.  
  836.     NOTES
  837.         This function is guaranteed to work correctly, if the PowerPCBase
  838.         is not passed in r3.
  839.  
  840.         Assembler programmers may use the macro _ADDTAIL located in
  841.         'powerpc/listsPPC.i'
  842.  
  843.         This function is safe to call from exception handlers.
  844.  
  845.     SEE ALSO
  846.         InsertPPC, AddHeadPPC, RemovePPC, RemHeadPPC, RemTailPPC,
  847.         EnqueuePPC, FindNamePPC, NewListPPC, powerpc/listsPPC.i
  848.  
  849. powerpc.library/AddTimePPC                          powerpc.library/AddTimePPC
  850.  
  851.     NAME
  852.         AddTimePPC - adds one time request to another (V7)
  853.  
  854.     CPU
  855.         PowerPC
  856.  
  857.     SYNOPSIS
  858.         AddTimePPC(_PowerPCBase, Dest, Source)
  859.                    r3            r4    r5
  860.  
  861.         void AddTimePPC(struct Library *, struct timeval *, struct timeval *);
  862.  
  863.     FUNCTION
  864.         This routine adds one timeval structure to another. The results are
  865.         stored in the destination (Dest + Source -> Dest)
  866.  
  867.         This is the mirror function of timer/AddTime.
  868.  
  869.     INPUTS
  870.         _PowerPCBase - base of powerpc.library
  871.         Dest - pointer to a timeval structure
  872.         Source - pointer to a timeval structure
  873.  
  874.     NOTES
  875.         This function is safe to call from exception handlers
  876.  
  877.     SEE ALSO
  878.         GetSysTimePPC, SubTimePPC, CmpTimePPC
  879.  
  880. powerpc.library/AllocPooledPPC                  powerpc.library/AllocPooledPPC
  881.  
  882.     NAME
  883.         AllocPooledPPC - allocate memory with the pool manager (V15)
  884.  
  885.     CPU
  886.         PowerPC
  887.  
  888.     SYNOPSIS
  889.         memory = AllocPooledPPC(_PowerPCBase, poolheader, size)
  890.         r3                      r3            r4          r5
  891.  
  892.         void *AllocPooledPPC(struct Library*, void *,ULONG);
  893.  
  894.     FUNCTION
  895.         Allocate memSize bytes of memory, and return a pointer. NULL is
  896.         returned if the allocation fails. This is the mirror function
  897.         of exec/AllocPooled. Refer to the documentation of exec/AllocPooled
  898.         for more infos.
  899.  
  900.     INPUTS
  901.         _PowerPCBase - base of powerpc.library
  902.         poolHeader - a specific private pool header.
  903.         size - size of memory to be allocated
  904.  
  905.     RESULT
  906.         memory - pointer to the allocated memory block or NULL for failure
  907.  
  908.     SEE ALSO
  909.         AllocVecPPC, CreatePoolPPC, DeletePoolPPC, AllocPooledPPC
  910.  
  911. powerpc.library/AllocSignalPPC                  powerpc.library/AllocSignalPPC
  912.  
  913.     NAME
  914.         AllocSignalPPC - allocate a signal (V8)
  915.  
  916.     CPU
  917.         PowerPC
  918.  
  919.     SYNOPSIS
  920.         signalnum = AllocSignalPPC(_PowerPCBase, signalNum)
  921.         r3                         r3            r4
  922.  
  923.         LONG AllocSignalPPC(struct Library *, LONG);
  924.  
  925.     FUNCTION
  926.         Allocate a signal bit from the current task's pool. Either a
  927.         particular bit or the next free bit may be allocated. This
  928.         is the mirror function of exec/AllocSignal.
  929.  
  930.     INPUTS
  931.         _PowerPCBase - base of powerpc.library
  932.         signalNum - the desired signal bit number (0..31) or -1
  933.                     if the next free bit should be allocated
  934.  
  935.     RESULT
  936.         signalnum - the signal bit allocated or -1 for failure.
  937.  
  938.     NOTES
  939.         IMPORTANT: The signal bit numbers are returned in the
  940.         68K notation! For example, if the number 27 is returned,
  941.         the waiting mask must be $08000000.
  942.  
  943.         All signal allocations are kept coherent on both CPU's.
  944.         A signal allocated on the 68K side is not free anymore
  945.         for the mirror PPC task and vice versa. The PPC also
  946.         can wait for signals or send signals allocated on the
  947.         68K side and vice versa (V11).
  948.  
  949.     SEE ALSO
  950.         FreeSignalPPC, SetSignalPPC, SignalPPC, WaitPPC
  951.  
  952. powerpc.library/AllocVecPPC                        powerpc.library/AllocVecPPC
  953.  
  954.     NAME
  955.         AllocVecPPC - allocates memory for PPC with MMU support (V7)
  956.  
  957.     CPU
  958.         PowerPC
  959.  
  960.     SYNOPSIS
  961.         memblock = AllocVecPPC(_PowerPCBase, memsize, attributes, alignment)
  962.         r3                     r3            r4       r5          r6
  963.  
  964.         void *AllocVecPPC(struct Library *, ULONG, ULONG, ULONG);
  965.  
  966.     FUNCTION
  967.         This function allocates memory which is correctly aligned for the use
  968.         by PowerPC applications. It's the mirror function of exec/AllocVec
  969.         but offers some additional features.
  970.         AllocVecPPC supports user defined alignment and allocation of memory-
  971.         blocks with a desired cache mode (MMU support only for V9+)
  972.         Since V12, it's possible to allocate memory, which is protected
  973.         against other tasks (either full- or write-protected).
  974.  
  975.     INPUTS
  976.         _PowerPCBase - base of powerpc.library
  977.         memsize - the amount of memory to be allocated.
  978.         attributes - the requirements as explained in exec/AllocMem
  979.                      This function offers some additional attributes:
  980.  
  981.             MEMF_WRITETHROUGH: maps the allocated memory as writethrough
  982.             MEMF_COPYBACK:     maps the allocated memory as copyback
  983.             MEMF_CACHEON:      maps the allocated memory as cachable
  984.             MEMF_CACHEOFF:     maps the allocated memory as noncachable
  985.             MEMF_GUARDED:      maps the allocated memory as guarded
  986.             MEMF_NOTGUARDED:   maps the allocated memory as not guarded
  987.             MEMF_BAT:          puts the allocated memory block into a
  988.                                BAT register
  989.             MEMF_PROTECT:      the memory block should be full-protected
  990.                                against other tasks (no user-accesses of
  991.                                other tasks allowed).
  992.             MEMF_WRITEPROTECT: the memory block should be write-protected
  993.                                against other tasks (no user-write-acesses
  994.                                of other tasks allowed).
  995.  
  996.         alignment - the desired alignment of the memory block. The system
  997.                     may round this value up to a minimal alignment. It's
  998.                     safe to pass 0 as alignment.
  999.  
  1000.     RESULT
  1001.         memblock - The address of the allocated memory. If the
  1002.                    memory couldn't be allocated 0 is returned.
  1003.  
  1004.     NOTES
  1005.         The amount of memory effectively allocated is usually bigger
  1006.         than the given memsize. It's not a good idea to call this
  1007.         function many times to allocate very small pieces of memory.
  1008.  
  1009.         If some of the additional memflags are specified, the alignment
  1010.         and the size is internally rounded up to meet the requirements
  1011.         of the MMU.
  1012.  
  1013.         The additional MMU memflags are intended for highly optimizing
  1014.         code and shoud not be used by standard applications.
  1015.  
  1016.         The memflag MEMF_BAT can improve the performance of the memory
  1017.         accesses heavily (especially on CPU's with software tablesearch).
  1018.         But DON'T use this flag unless you really need the speed. Note:
  1019.         The required free memory has to be much bigger than the size of
  1020.         the memory to be allocated, because there are severe alignment
  1021.         restrictions when using BAT registers.
  1022.  
  1023.         The memflag MEMF_BAT has no effect if the task runs with BAT MMU
  1024.         Setup.
  1025.  
  1026.         Note that no other tasks should access memory which was allocated
  1027.         using special MMU memflags, because the other task can probably
  1028.         run under a different MMU setup which can cause cache problems,
  1029.         if the other one writes to the same memory in copyback mode
  1030.         while this task accesses the data in noncachable mode, for
  1031.         example.
  1032.  
  1033.         The MMU support ist not implemented in powerpc.library <= V9.
  1034.         The memory protection support ist not implemented in
  1035.         powerpc.library <= V11.
  1036.  
  1037.     BUGS
  1038.         Before V14, allocations > 512KB could fail.
  1039.  
  1040.     SEE ALSO
  1041.         FreeVecPPC, FreeAllMem, powerpc/memoryPPC.i
  1042.  
  1043. powerpc.library/AllocXMsgPPC                      powerpc.library/AllocXMsgPPC
  1044.  
  1045.     NAME
  1046.         AllocXMsgPPC - allocates a message for Inter-CPU communication (V12)
  1047.  
  1048.     CPU
  1049.         PowerPC
  1050.  
  1051.     SYNOPSIS
  1052.         message = AllocXMsgPPC(_PowerPCBase, bodysize, replyport)
  1053.         r3                     r3            r4        r5
  1054.  
  1055.         struct Message *AllocXMsgPPC(struct Library *, ULONG, struct MsgPort *);
  1056.  
  1057.     FUNCTION
  1058.         This function allocates memory for a message which can be used
  1059.         for Inter-CPU communication. Some fields of the message are
  1060.         initialized.
  1061.         After this function was called, the message body must be
  1062.         created before sending this message.
  1063.  
  1064.     INPUTS
  1065.         _PowerPCBase - base of powerpc.library
  1066.         bodysize - the size of the message body (max. 65535-MN_SIZE)
  1067.         replyport - the reply port
  1068.  
  1069.     RESULT
  1070.         message - The address of an initialized message (except for
  1071.                   the message body, which must be initialized by the
  1072.                   programmer).
  1073.  
  1074.     NOTES
  1075.         Calling this function is the only way allowed to create a
  1076.         message which can be sent to a 68K task.
  1077.  
  1078.         A message allocated with 'AllocXMsgPPC' should be freed using
  1079.         'FreeXMsgPPC' if it is not used anymore. Since V14, it is
  1080.         allowed to free the messsage using 'FreeXMsg' on the
  1081.         68K side (which is internally done using a cross call).
  1082.  
  1083.         An Inter-CPU message must be sent with 'PutXMsgPPC' to a 68K
  1084.         task.
  1085.  
  1086.         It is possible not to specify a replyport (simply set
  1087.         replyport to NULL).
  1088.  
  1089.         If you want to be compatible to earlier versions, you
  1090.         shouldn't free InterCPU messages by the foreign task.
  1091.  
  1092.     SEE ALSO
  1093.         FreeXMsgPPC, PutXMsgPPC
  1094.  
  1095. powerpc.library/AttemptSemaphorePPC        powerpc.library/AttemptSemaphorePPC
  1096.  
  1097.     NAME
  1098.         AttemptSemaphorePPC - try to obtain without blocking (V8)
  1099.  
  1100.     CPU
  1101.         PowerPC
  1102.  
  1103.     SYNOPSIS
  1104.         status = AttemptSemaphorePPC(_PowerPCBase, SignalSemaphorePPC)
  1105.                                      r3            r4
  1106.  
  1107.         LONG AttemptSemaphorePPC(struct Library *,
  1108.                                   struct SignalSemaphorePPC *);
  1109.  
  1110.     FUNCTION
  1111.         Tries to get exclusive access to a signal semaphore. If the semaphore
  1112.         is locked by another task, this function returns with an appropriate
  1113.         status value. This is the mirror function of exec/AttemptSemaphore
  1114.  
  1115.     INPUTS
  1116.         _PowerPCBase - base of powerpc.library
  1117.         SignalSemaphorePPC - pointer to a signalsemaphorePPC structure
  1118.  
  1119.     RESULT
  1120.         status - status value:
  1121.             ATTEMPT_SUCCESS: operation successful
  1122.             ATTEMPT_FAILURE: semaphore couldn't be locked
  1123.  
  1124.     NOTES
  1125.         This call is guaranteed to preserve all GPR (except r0 and r3)
  1126.         and the CTR.
  1127.  
  1128.     SEE ALSO
  1129.         InitSemaphorePPC, FreeSemaphorePPC, ObtainSemaphorePPC,
  1130.         ReleaseSemaphorePPC, AddSemaphorePPC, RemSemaphorePPC
  1131.         FindSemaphorePPC, TrySemaphorePPC, powerpc/semaphoresPPC.i
  1132.  
  1133. powerpc.library/AttemptSemaphoreSharedPPC  powerpc.library/AttemptSemaphoreSharedPPC
  1134.  
  1135.     NAME
  1136.         AttemptSemaphoreSharedPPC - try to obtain without blocking (V15)
  1137.  
  1138.     CPU
  1139.         PowerPC
  1140.  
  1141.     SYNOPSIS
  1142.         status = AttemptSemaphoreSharedPPC(_PowerPCBase, SignalSemaphorePPC)
  1143.                                            r3            r4
  1144.  
  1145.         LONG AttemptSemaphoreSharedPPC(struct Library *,
  1146.                                        struct SignalSemaphorePPC *);
  1147.  
  1148.     FUNCTION
  1149.         This call is similar to powerpc/ObtainSemaphoreSharedPPC except that
  1150.         it will not block if the semaphore could not be locked.
  1151.  
  1152.         This is the mirror function of exec/AttemptSemaphoreShared
  1153.  
  1154.     INPUTS
  1155.         _PowerPCBase - base of powerpc.library
  1156.         SignalSemaphorePPC - pointer to a signalsemaphorePPC structure
  1157.  
  1158.     RESULT
  1159.         status - status value:
  1160.             ATTEMPT_SUCCESS: operation successful
  1161.             ATTEMPT_FAILURE: semaphore couldn't be locked
  1162.  
  1163.     NOTES
  1164.         This call is guaranteed to preserve all GPR (except r0 and r3)
  1165.         and the CTR.
  1166.  
  1167.     SEE ALSO
  1168.         AttemptSemaphorePPC, ObtainSemaphoreSharedPPC, powerpc/semaphoresPPC.i
  1169.  
  1170. powerpc.library/CauseInterrupt                  powerpc.library/CauseInterrupt
  1171.  
  1172.     NAME
  1173.         CauseInterrupt - invokes all interrupt handlers (V15)
  1174.  
  1175.     CPU
  1176.         PowerPC
  1177.  
  1178.     SYNOPSIS
  1179.         CauseInterrupt()
  1180.  
  1181.         void CauseInterrupt();
  1182.  
  1183.     FUNCTION
  1184.         Invokes all PPC interrupt handlers, which were added using
  1185.         SetExcHandler and an exception ID = EXCF_INTERRUPT.
  1186.  
  1187.     NOTES
  1188.         This function can be compared to the softinterrupt mechanism
  1189.         of exec. But the interrupt handlers are not removed after
  1190.         they were invoked. They have to removed using RemExcHandler.
  1191.  
  1192.         All interrupt handlers are guaranteed to be executed
  1193.         before this function is left.
  1194.  
  1195.     SEE ALSO
  1196.         CausePPCInterrupt
  1197.  
  1198. powerpc.library/ChangeMMU                            powerpc.library/ChangeMMU
  1199.  
  1200.     NAME
  1201.         ChangeMMU - changes the MMU setup of the current task (V10)
  1202.  
  1203.     CPU
  1204.         PowerPC
  1205.  
  1206.     SYNOPSIS
  1207.         ChangeMMU(_PowerPCBase, MMUMode)
  1208.                   r3            r4
  1209.  
  1210.         void ChangeMMU(struct Library *, ULONG);
  1211.  
  1212.     FUNCTION
  1213.         Changes the MMU setup of the currently running task. A task is able
  1214.         to run with two different MMU setups:
  1215.  
  1216.         - paged MMU setup: The standard method, where almost every memory
  1217.           access is controlled by the page table
  1218.         - BAT MMU setup: Almost all the memory is controlled by the 4 BAT
  1219.           registers.
  1220.  
  1221.     INPUTS
  1222.         _PowerPCBase - base of powerpc.library
  1223.         MMUMode - CHMMU_STANDARD: change MMU setup to standard
  1224.                   CHMMU_BAT     : change MMU setup to BAT setup
  1225.  
  1226.     NOTES
  1227.         This function should usually NOT be called. It is intended for
  1228.         highly optimizing code and should only be used, if enough MMU
  1229.         knowledge is present.
  1230.  
  1231.         The state of the current task can be changed from the shell by
  1232.         using the tool 'changemmu' (and this is the better way how to
  1233.         change the setup rather than calling the library function)
  1234.  
  1235.     SEE ALSO
  1236.         powerpc/tasksppc.i
  1237.  
  1238. powerpc.library/ClearExcMMU                        powerpc.library/ClearExcMMU
  1239.  
  1240.     NAME
  1241.         ClearExcMMU - removes the temp. MMU setup installed by SetExcMMU (V10)
  1242.  
  1243.     CPU
  1244.         PowerPC
  1245.  
  1246.     SYNOPSIS
  1247.         ClearExcMMU(_PowerPCBase)
  1248.                     r3
  1249.  
  1250.         void ClearExcMMU(struct Library *);
  1251.  
  1252.     FUNCTION
  1253.         This function is for exception handlers only. It removes the temporary
  1254.         BAT based MMU setup, which was installed using SetExcMMU. The old MMU
  1255.         state is restored.
  1256.  
  1257.     INPUTS
  1258.         _PowerPCBase - base of powerpc.library
  1259.  
  1260.     NOTES
  1261.         This function must not be called from anywhere else than from
  1262.         an exception handler.
  1263.  
  1264.     SEE ALSO
  1265.         SetExcMMU
  1266.  
  1267. powerpc.library/CmpTimePPC                          powerpc.library/CmpTimePPC
  1268.  
  1269.     NAME
  1270.         CmpTimePPC - compares two timeval structures (V7)
  1271.  
  1272.     CPU
  1273.         PowerPC
  1274.  
  1275.     SYNOPSIS
  1276.         result = CmpTimePPC(_PowerPCBase, Dest, Source)
  1277.         r3                  r3            r4    r5
  1278.  
  1279.         LONG CmpTimePPC(struct Library *, struct timeval *, struct timeval *);
  1280.  
  1281.     FUNCTION
  1282.         This routine compares two timeval structures.
  1283.  
  1284.         This is the mirror function of timer/CmpTime.
  1285.  
  1286.     INPUTS
  1287.         _PowerPCBase - base of powerpc.library
  1288.         Dest - pointer to a timeval structure
  1289.         Source - pointer to a timeval structure
  1290.  
  1291.     RESULT
  1292.         0  - if both timeval structures are equal
  1293.         -1 - if Dest is greater than Source
  1294.         1  - if Dest is less than Source
  1295.  
  1296.  
  1297.     NOTES
  1298.         This function is safe to call from exception handlers
  1299.  
  1300.     SEE ALSO
  1301.         GetSysTimePPC, AddTimePPC, SubTimePPC
  1302.  
  1303. powerpc.library/CopyMemPPC                          powerpc.library/CopyMemPPC
  1304.  
  1305.     NAME
  1306.         CopyMemPPC - copies memory the fastest way possible (V12)
  1307.  
  1308.     CPU
  1309.         PowerPC
  1310.  
  1311.     SYNOPSIS
  1312.         CopyMemPPC(_PowerPCBase, source, dest, size)
  1313.                    r3            r4      r5    r6
  1314.  
  1315.         void CopyMemPPC(struct Library *, void *, void *, ULONG);
  1316.  
  1317.     FUNCTION
  1318.         This function copies a source memory area to a destination memory
  1319.         area. No overlapping is supported. CopyMemPPC tries to copy with
  1320.         the highest bandwidth possible.
  1321.  
  1322.     INPUTS
  1323.         _PowerPCBase - base of powerpc.library
  1324.         source - address of the source memory area
  1325.         dest - address of the destination memory area
  1326.         size - size of the memory area to be copied
  1327.  
  1328.     NOTES
  1329.         The highest performance can be achieved if both memory areas have
  1330.         a minimal alignment of 8.
  1331.  
  1332. powerpc.library/CreateMsgPortPPC              powerpc.library/CreateMsgPortPPC
  1333.  
  1334.     NAME
  1335.         CreateMsgPortPPC - creates a new PPC message port (V11)
  1336.  
  1337.     CPU
  1338.         PowerPC
  1339.  
  1340.     SYNOPSIS
  1341.         MsgPortPPC = CreateMsgPortPPC(_PowerPCBase)
  1342.         r3                            r3
  1343.  
  1344.         struct MsgPortPPC *CreateMsgPortPPC(struct Library *);
  1345.  
  1346.     FUNCTION
  1347.         This function creates a new PowerPC message port. This is the only
  1348.         way allowed to create a PPC message port. It is the mirror function
  1349.         of exec/CreateMsgPort.
  1350.  
  1351.     INPUTS
  1352.         _PowerPCBase - base of powerpc.library
  1353.  
  1354.     RESULT
  1355.         MsgPortPPC - pointer to a MsgPortPPC structure or NULL for failure
  1356.  
  1357.     NOTES
  1358.         A PowerPC message port should be deleted using 'DeleteMsgPortPPC'
  1359.         if it is not used anymore.
  1360.  
  1361.         It's forbidden to access PPC message ports by the standard
  1362.         exec message handling routines.
  1363.  
  1364.     SEE ALSO
  1365.         DeleteMsgPortPPC,FindPortPPC,AddPortPPC,RemPortPPC
  1366.         powerpc/portsPPC.i
  1367.  
  1368. powerpc.library/CreatePoolPPC                    powerpc.library/CreatePoolPPC
  1369.  
  1370.     NAME
  1371.         CreatePoolPPC - creates a memory allocation pool (V15)
  1372.  
  1373.     CPU
  1374.         PowerPC
  1375.  
  1376.     SYNOPSIS
  1377.         Poolheader = CreatePoolPPC(_PowerPCBase, attr, puddlesize, treshsize)
  1378.         r3                         r3            r4    r5          r6
  1379.  
  1380.         void *CreatePoolPPC(struct Library *, ULONG, ULONG, ULONG);
  1381.  
  1382.     FUNCTION
  1383.         Allocate and prepare a new memory pool header. This is the mirror
  1384.         function of exec/CreatePool. Refer to the documentation of
  1385.         exec/CreatePool for more infos.
  1386.  
  1387.     INPUTS
  1388.         _PowerPCBase - base of powerpc.library
  1389.         attr - the requirements as explained in powerpc/AllocVecPPC
  1390.         puddleSize - the size of Puddles
  1391.         threshSize - the largest allocation that goes into normal puddles
  1392.                      This *MUST* be less than or equal to puddleSize.
  1393.  
  1394.     RESULT
  1395.         poolheader - The address of a new pool header, or NULL for error.
  1396.  
  1397.     NOTES
  1398.         The memory attribute MEMF_BAT is not supported for CreatePoolPPC.
  1399.  
  1400.         The puddlesize value is rounded up by the system to meet MMU
  1401.         alignment restrictions. Currently every pool's size is a multiple
  1402.         of 4KB.
  1403.  
  1404.     SEE ALSO
  1405.         AllocVecPPC, DeletePoolPPC, AllocPooledPPC, FreePooledPPC
  1406.         powerpc/memoryPPC.i
  1407.  
  1408. powerpc.library/CreateTaskPPC                    powerpc.library/CreateTaskPPC
  1409.  
  1410.     NAME
  1411.         CreateTaskPPC - creates a new PPC task (V8)
  1412.  
  1413.     CPU
  1414.         PowerPC
  1415.  
  1416.     SYNOPSIS
  1417.         TaskPPC = CreateTaskPPC(_PowerPCBase, TagItems)
  1418.         r3                      r3            r4
  1419.  
  1420.         struct TaskPPC *CreateTaskPPC(struct Library *, struct TagItem *);
  1421.  
  1422.     FUNCTION
  1423.         This function creates a new PPC task under control of the tags passed.
  1424.         All memory (inclusive stack) is allocated automatically.
  1425.  
  1426.         PPC tasks are similar to exec tasks (the first element of the TaskPPC
  1427.         structure is an exec task structure). The scheduling of these tasks
  1428.         works similar to exec, so a running task blocks all tasks with lower
  1429.         priority.
  1430.  
  1431.     INPUTS
  1432.         _PowerPCBase - base of powerpc.library
  1433.         TagItems - pointer to a tagitem array. The following tags are
  1434.                    supported:
  1435.  
  1436.             TASKATTR_CODE:      pointer to the entry point of the new task
  1437.                                 (MUST be specified)
  1438.             TASKATTR_EXITCODE:  pointer to the exit routine of the new task
  1439.             TASKATTR_NAME:      task name (MUST be specified)
  1440.             TASKATTR_PRI:       task priority (-128 ... 127). Default = 0.
  1441.             TASKATTR_STACKSIZE: the desired stack size. If this tag is omitted
  1442.                                 the default stack size will be 16K.
  1443.             TASKATTR_R2:        smalldata base of the PPC program
  1444.             TASKATTR_R3:
  1445.             ...
  1446.             TASKATTR_R10:       parameters to be passed to the new task
  1447.                                 in the specified registers
  1448.             TASKATTR_MOTHERPRI: the priority is taken from the currently
  1449.                                 running task (TASKATTR_PRI is ignored) (V9)
  1450.             TASKATTR_BAT:       lets the task run under BAT MMU setup by
  1451.                                 default (V10)
  1452.             TASKATTR_INHERITR2: the child task's r2 register is set to
  1453.                                 the mother task's r2. TASKATTR_R2 is overridden.
  1454.                                 This way the child tasks can access the mother
  1455.                                 task's variables (V15)
  1456.             TASKATTR_ATOMIC:    the newly created task becomes non-interruptable
  1457.                                 from other task's point of view. The task can
  1458.                                 still be interrupted by exceptions/interrupts,
  1459.                                 but it can't be interrupted by other tasks (V15)
  1460.  
  1461.     RESULT
  1462.         TaskPPC - pointer to a TaskPPC structure or NULL for failure
  1463.  
  1464.     NOTES
  1465.         If a 68K application only wants to call a PPC function, it's
  1466.         better to use Run68K instead of creating a new PPC task.
  1467.  
  1468.         While a PPC task created by Run68K is always connected to
  1469.         the calling 68K process, a task created by CreateTaskPPC is
  1470.         completely independent. If such a task peforms 68K calls, a
  1471.         new mirror process on the 68K side is created.
  1472.  
  1473.         If an alternative exit code is specified (TASKATTR_EXITCODE)
  1474.         the value passed in TASKATTR_R2 remains intact in this exit
  1475.         code.
  1476.  
  1477.         Use TASKATTR_INHERITR2 whenever possible, it makes programming
  1478.         multi-task applications easier. But if you do so, your application
  1479.         will require powerpc.library V15+.
  1480.  
  1481.         Don't use TASKATTR_ATOMIC, except if you have a serious reason
  1482.         to use it. This tag might have a severe impact on the WarpOS
  1483.         multitasking.
  1484.  
  1485.     SEE ALSO
  1486.         DeleteTaskPPC,FindTaskPPC,powerpc/tasksPPC.i
  1487.  
  1488. powerpc.library/DeleteMsgPortPPC              powerpc.library/DeleteMsgPortPPC
  1489.  
  1490.     NAME
  1491.         DeleteMsgPortPPC - deletes a PPC message port (V11)
  1492.  
  1493.     CPU
  1494.         PowerPC
  1495.  
  1496.     SYNOPSIS
  1497.         DeleteMsgPortPPC(_PowerPCBase, MsgPortPPC)
  1498.                          r3            r4
  1499.  
  1500.         void DeleteMsgPortPPC(struct Library *, struct MsgPortPPC *);
  1501.  
  1502.     FUNCTION
  1503.         This function deletes a PowerPC message port created using
  1504.         'CreateMsgPortPPC'. It is the mirror function of exec/DeleteMsgPort.
  1505.  
  1506.     INPUTS
  1507.         _PowerPCBase - base of powerpc.library
  1508.         MsgPortPPC - Pointer to the message port to delete. It's safe to
  1509.                      pass NULL as parameter
  1510.  
  1511.     NOTES
  1512.         Calling 'DeleteMsgPortPPC' is the ONLY way allowed to delete a PPC
  1513.         message port.
  1514.  
  1515.     SEE ALSO
  1516.         CreateMsgPortPPC,FindPortPPC,AddPortPPC,RemPortPPC
  1517.         powerpc/portsPPC.i
  1518.  
  1519. powerpc.library/DeletePoolPPC                    powerpc.library/DeletePoolPPC
  1520.  
  1521.     NAME
  1522.         DeletePoolPPC - deletes a memory allocation pool (V15)
  1523.  
  1524.     CPU
  1525.         PowerPC
  1526.  
  1527.     SYNOPSIS
  1528.         DeletePoolPPC(_PowerPCBase, poolheader)
  1529.                       r3            r4
  1530.  
  1531.         void DeletePoolPPC(struct Library *, void *);
  1532.  
  1533.     FUNCTION
  1534.         Frees all memory in all pudles of the specified pool header, then
  1535.         deletes the pool header. Individual free calls are not needed.
  1536.  
  1537.         This is the mirror function of exec/DeletePool. Refer to the
  1538.         documentation of exec/DeletePool for more infos.
  1539.  
  1540.     INPUTS
  1541.         _PowerPCBase - base of powerpc.library
  1542.         poolheader - value returned by CreatePoolPPC
  1543.  
  1544.     SEE ALSO
  1545.         FreeVecPPC, CreatePoolPPC, AllocPooledPPC, FreePooledPPC
  1546.         powerpc/memoryPPC.i
  1547.  
  1548. powerpc.library/DeleteTaskPPC                    powerpc.library/DeleteTaskPPC
  1549.  
  1550.     NAME
  1551.         DeleteTaskPPC - deletes a PPC task (V8)
  1552.  
  1553.     CPU
  1554.         PowerPC
  1555.  
  1556.     SYNOPSIS
  1557.         DeleteTaskPPC(_PowerPCBase, PPCTask)
  1558.                       r3            r4
  1559.  
  1560.         void DeleteTaskPPC(struct Library *, struct TaskPPC *);
  1561.  
  1562.     FUNCTION
  1563.         Deletes a PPC task created by CreateTaskPPC.
  1564.  
  1565.     INPUTS
  1566.         _PowerPCBase - base of powerpc.library
  1567.         TaskPPC - PPC task to remove or NULL for self removal
  1568.  
  1569.     NOTES
  1570.         It's not encouraged to delete other tasks. This function
  1571.         should only be called with a NULL parameter to remove the
  1572.         calling task itself.
  1573.  
  1574.         The system may also remove an existing 68K mirror process
  1575.         connected to the calling PPC task.
  1576.  
  1577.     SEE ALSO
  1578.         CreateTaskPPC,FindTaskPPC,powerpc/tasksPPC.i
  1579.  
  1580. powerpc.library/EndSnoopTask                      powerpc.library/EndSnoopTask
  1581.  
  1582.     NAME
  1583.         EndSnoopTask - stops monitoring a PPC task (V13)
  1584.  
  1585.     CPU
  1586.         PowerPC
  1587.  
  1588.     SYNOPSIS
  1589.         EndSnoopTask (_PowerPCBase, SnoopID)
  1590.                       r3            r4
  1591.  
  1592.         void EndSnoopTask (struct Library *, ULONG);
  1593.  
  1594.     FUNCTION
  1595.         This function removes a callback job, which was installed using
  1596.         powerpc/SnoopTask.
  1597.  
  1598.     INPUTS
  1599.         _PowerPCBase - base of powerpc.library
  1600.         SnoopID - The value returned by SnoopTask. It's safe to pass
  1601.                   NULL as parameter (is handled as no-op)
  1602.  
  1603.     SEE ALSO
  1604.         SnoopTask
  1605.  
  1606. powerpc.library/EnqueuePPC                          powerpc.library/EnqueuePPC
  1607.  
  1608.     NAME
  1609.         EnqueuePPC - inserts a node into a list sorted by priority (V8)
  1610.  
  1611.     CPU
  1612.         PowerPC
  1613.  
  1614.     SYNOPSIS
  1615.         EnqueuePPC(_PowerPCBase, list, node)
  1616.                    r3            r4    r5
  1617.  
  1618.         void EnqueuePPC(struct Library *, struct List*, struct Node*);
  1619.  
  1620.     FUNCTION
  1621.         Inserts a node to a standard exec list based on the node priority.
  1622.         In this way a list can be kept sorted by priority all the time.
  1623.         New nodes will be inserted in front of the first node with a
  1624.         lower priority. This is the mirror function of exec/Enqueue.
  1625.  
  1626.     INPUTS
  1627.         _PowerPCBase - base of powerpc.library (can be omitted)
  1628.         list - a pointer to the target list
  1629.         node - the node to enqueue
  1630.  
  1631.     NOTES
  1632.         This function is guaranteed to work correctly, if the PowerPCBase
  1633.         is not passed in r3.
  1634.  
  1635.         This function is safe to call from exception handlers.
  1636.  
  1637.     SEE ALSO
  1638.         InsertPPC, AddTailPPC, AddHeadPPC, RemovePPC, RemHeadPPC,
  1639.         RemTailPPC, FindNamePPC, NewListPPC, powerpc/listsPPC.i
  1640.  
  1641. powerpc.library/FindNamePPC                        powerpc.library/FindNamePPC
  1642.  
  1643.     NAME
  1644.         FindNamePPC - finds a node with given name (V8)
  1645.  
  1646.     CPU
  1647.         PowerPC
  1648.  
  1649.     SYNOPSIS
  1650.         node = FindNamePPC(_PowerPCBase, start, name)
  1651.         r3                 r3            r4     r5
  1652.  
  1653.         struct Node *FindNamePPC(struct Library *, struct List*, STRPTR);
  1654.  
  1655.     FUNCTION
  1656.         Searches a list for a node with the given name. If multiple nodes
  1657.         with same names should be found, this function can be called with
  1658.         a node starting point.
  1659.  
  1660.     INPUTS
  1661.         _PowerPCBase - base of powerpc.library
  1662.         list - a list header or a node to start the searche (if node,
  1663.                this one is skipped)
  1664.         name - the name of the node
  1665.  
  1666.     NOTES
  1667.         This function is guaranteed to work correctly, if the PowerPCBase
  1668.         is not passed in r3.
  1669.  
  1670.         This function is safe to call from exception handlers.
  1671.  
  1672.     SEE ALSO
  1673.         InsertPPC, AddTailPPC, AddHeadPPC, RemovePPC, RemHeadPPC,
  1674.         RemTailPPC, EnqueuePPC, NewListPPC, powerpc/listsPPC.i
  1675.  
  1676. powerpc.library/FindPortPPC                        powerpc.library/FindPortPPC
  1677.  
  1678.     NAME
  1679.         FindPortPPC - finds a public PPC message port by name (V11)
  1680.  
  1681.     CPU
  1682.         PowerPC
  1683.  
  1684.     SYNOPSIS
  1685.         MsgPortPPC = FindPortPPC(_PowerPCBase, name)
  1686.         r3                       r3            r4
  1687.  
  1688.         struct MsgPortPPC* FindPortPPC(struct Library *, STRPTR);
  1689.  
  1690.     FUNCTION
  1691.         This function will search the global list of PPC message ports
  1692.         for a port with the given name. No arbritation is needed. This
  1693.         is the mirror function of exec/FindPort.
  1694.  
  1695.     INPUTS
  1696.         _PowerPCBase - base of powerpc.library
  1697.         name - name of the PPC message port to search
  1698.  
  1699.     RESULT
  1700.         MsgPortPPC - pointer to a PPC message port or NULL if it was not
  1701.                      found.
  1702.  
  1703.     SEE ALSO
  1704.         CreateMsgPortPPC,DeleteMsgPortPPC,AddPortPPC,RemPortPPC
  1705.         powerpc/portsPPC.i
  1706.  
  1707. powerpc.library/FindSemaphorePPC              powerpc.library/FindSemaphorePPC
  1708.  
  1709.     NAME
  1710.         FindSemaphorePPC - finds a public semaphore (V8)
  1711.  
  1712.     CPU
  1713.         PowerPC
  1714.  
  1715.     SYNOPSIS
  1716.         SignalsemaphorePPC = FindSemaphorePPC(_PowerPCBase, SemaphoreName)
  1717.         r3                                    r3            r4
  1718.  
  1719.         struct signalsemaphorePPC *FindSemaphorePPC(struct Library *, STRPTR);
  1720.  
  1721.     FUNCTION
  1722.         Finds a public semaphore added to the system semaphore list by
  1723.         AddSemaphore. This is the mirror function to exec/FindSemaphore.
  1724.  
  1725.     INPUTS
  1726.         _PowerPCBase - base of powerpc.library
  1727.         SemaphoreName - name of the semaphore to find
  1728.  
  1729.     RESULT
  1730.         SignalsemaphorePPC - signal semaphore requested or 0 if it was not
  1731.                              found
  1732.  
  1733.     SEE ALSO
  1734.         InitSemaphorePPC, FreeSemaphorePPC, ObtainSemaphorePPC,
  1735.         AttemptSemaphorePPC, ReleaseSemaphorePPC, AddSemaphorePPC,
  1736.         RemSemaphorePPC, TrySemaphorePPC, powerpc/semaphoresPPC.i
  1737.  
  1738. powerpc.library/FindTagItemPPC                  powerpc.library/FindTagItemPPC
  1739.  
  1740.     NAME
  1741.         FindTagItemPPC - scan a tag list for a specific tag (V8)
  1742.  
  1743.     CPU
  1744.         PowerPC
  1745.  
  1746.     SYNOPSIS
  1747.         tag = FindTagItemPPC(_PowerPCBase, tagValue, tagList)
  1748.         r3                   r3            r4        r5
  1749.  
  1750.         struct TagItem *FindTagItemPPC(struct Library *, ULONG,
  1751.                                        struct TagItem *);
  1752.  
  1753.     FUNCTION
  1754.         Scans a tag list and returns a pointer to the first item with
  1755.         ti_Tag matching the 'tagValue' parameter. This is the mirror
  1756.         function of utility/FindTagItem.
  1757.  
  1758.     INPUTS
  1759.         _PowerPCBase - base of powerpc.library
  1760.         tagValue - tag value to search for
  1761.         tagList - tag item list to search (may be NULL)
  1762.  
  1763.     RESULT
  1764.         tag - a pointer to the item with ti_Tag matching 'tagValue'
  1765.               or NULL if no match was found.
  1766.  
  1767.     NOTES
  1768.         This function is safe to call from exception handlers.
  1769.  
  1770.     SEE ALSO
  1771.         GetTagDataPPC, NextTagItemPPC, utility/tagitem.i
  1772.  
  1773. powerpc.library/FindTaskByID                      powerpc.library/FindTaskByID
  1774.  
  1775.     NAME
  1776.         FindTaskByID - evaluates the task address for a given task ID (V14)
  1777.  
  1778.     CPU
  1779.         PowerPC
  1780.  
  1781.     SYNOPSIS
  1782.         TaskPPC = FindTaskByID(_PowerPCBase, taskID)
  1783.         r3                     r3            r4
  1784.  
  1785.         struct TaskPPC *FindTaskByID(struct Library *, ULONG);
  1786.  
  1787.     FUNCTION
  1788.         Evaluates the task address for a given task ID.
  1789.  
  1790.     INPUTS
  1791.         _PowerPCBase - base of powerpc.library
  1792.         taskID - the task's ID number
  1793.  
  1794.     RESULT
  1795.         TaskPPC - Pointer to the PPCTask structure
  1796.  
  1797.     SEE ALSO
  1798.         CreateTaskPPC,DeleteTaskPPC,powerpc/tasksPPC.i
  1799.  
  1800. powerpc.library/FindTaskPPC                    powerpc.library/FindTaskPPC
  1801.  
  1802.     NAME
  1803.         FindTaskPPC - finds a task by name (or find oneself) (V8)
  1804.  
  1805.     CPU
  1806.         PowerPC
  1807.  
  1808.     SYNOPSIS
  1809.         TaskPPC = FindTaskPPC(_PowerPCBase, Name)
  1810.         r3                    r3            r4
  1811.  
  1812.         struct TaskPPC *FindTaskPPC(struct Library *, STRPTR);
  1813.  
  1814.     FUNCTION
  1815.         Tries to find a task with the given name (or the current task if
  1816.         NULL is specified). This is the mirror function of exec/FindTask.
  1817.  
  1818.     INPUTS
  1819.         _PowerPCBase - base of powerpc.library
  1820.         Name - name of the task to find or NULL for the current task
  1821.  
  1822.     RESULT
  1823.         TaskPPC - pointer to the TaskPPC structure or NULL if the task
  1824.                   was not found
  1825.  
  1826.     NOTES
  1827.         Be cautious that a task may be removed at any time, so the
  1828.         pointer returned may not be valid anymore when used.
  1829.  
  1830.         It's allowed to call FindTaskPPC with a NULL parameter from
  1831.         an exception handler. In this case the interrupted task is
  1832.         returned.
  1833.  
  1834.     SEE ALSO
  1835.         CreateTaskPPC, DeleteTaskPPC, FindTaskByID, powerpc/tasksPPC.i
  1836.  
  1837. powerpc.library/FreeAllMem                          powerpc.library/FreeAllMem
  1838.  
  1839.     NAME
  1840.         FreeAllMem - frees all memory allocated by the calling task (V11)
  1841.  
  1842.     CPU
  1843.         PowerPC
  1844.  
  1845.     SYNOPSIS
  1846.         FreeAllMem(_PowerPCBase)
  1847.                    r3
  1848.  
  1849.         void FreeVecPPC(struct Library *);
  1850.  
  1851.     FUNCTION
  1852.         Frees all memory which was allocated by the calling task. This is an
  1853.         easy way to free the memory rather than calling FreeVecPPC for every
  1854.         allocation made.
  1855.  
  1856.     INPUTS
  1857.         _PowerPCBase - base of powerpc.library
  1858.  
  1859.     SEE ALSO
  1860.         AllocVecPPC,FreeVecPPC,powerpc/memoryPPC.i
  1861.  
  1862. powerpc.library/FreePooledPPC                    powerpc.library/FreePooledPPC
  1863.  
  1864.     NAME
  1865.         FreePooledPPC - free pooled memory (V15)
  1866.  
  1867.     CPU
  1868.         PowerPC
  1869.  
  1870.     SYNOPSIS
  1871.         FreePooledPPC(_PowerPCBase, poolheader, memory, size)
  1872.                       r3            r4          r5      r6
  1873.  
  1874.         void *FreePooledPPC(struct Library*, void *, void *,ULONG);
  1875.  
  1876.     FUNCTION
  1877.         Deallocates memory allocated by AllocPooledPPC. The size of the
  1878.         allocation *MUST* match the size given to AllocPooledPPC. Only
  1879.         memory allocated by AllocPooled may be freed with this function!
  1880.  
  1881.         This is the mirror function of exec/FreePooled. Refer to the
  1882.         documentation of exec/FreePooled for more infos.
  1883.  
  1884.     INPUTS
  1885.         _PowerPCBase - base of powerpc.library
  1886.         poolHeader - a specific private pool header.
  1887.         memory - pointer to the memory to be freed
  1888.         size - size of the memory allocation
  1889.  
  1890.     SEE ALSO
  1891.         FreeVecPPC, CreatePoolPPC, DeletePoolPPC, AllocPooledPPC
  1892.  
  1893.  
  1894. powerpc.library/FreeSemaphorePPC              powerpc.library/FreeSemaphorePPC
  1895.  
  1896.     NAME
  1897.         FreeSemaphorePPC - frees a signal semaphore (V8)
  1898.  
  1899.     CPU
  1900.         PowerPC
  1901.  
  1902.     SYNOPSIS
  1903.         FreeSemaphorePPC(_PowerPCBase, SignalSemaphorePPC)
  1904.                          r3            r4
  1905.  
  1906.         void FreeSemaphorePPC(struct Library *, struct SignalSemaphorePPC *);
  1907.  
  1908.     FUNCTION
  1909.         Frees a signal semaphore initialized by InitSemaphorePPC. There
  1910.         is no similar function in exec.library!
  1911.  
  1912.     INPUTS
  1913.         _PowerPCBase - base of powerpc.library
  1914.         SignalSemaphorePPC - pointer to a signalsemaphorePPC structure
  1915.  
  1916.     SEE ALSO
  1917.         InitSemaphorePPC, ObtainSemaphorePPC, AttemptSemaphorePPC,
  1918.         ReleaseSemaphorePPC, AddSemaphorePPC, RemSemaphorePPC,
  1919.         FindSemaphorePPC, TrySemaphorePPC, powerpc/semaphoresPPC.i
  1920.  
  1921. powerpc.library/FreeSignalPPC                    powerpc.library/FreeSignalPPC
  1922.  
  1923.     NAME
  1924.         FreeSignalPPC - frees a signal (V8)
  1925.  
  1926.     CPU
  1927.         PowerPC
  1928.  
  1929.     SYNOPSIS
  1930.         FreeSignalPPC(_PowerPCBase, signalNum)
  1931.                       r3            r4
  1932.  
  1933.         void FreeSignalPPC(struct Library *, LONG);
  1934.  
  1935.     FUNCTION
  1936.         Frees a signal bit allocated by AllocSignalPPC. This is the
  1937.         mirror function of exec/FreeSignal.
  1938.  
  1939.     INPUTS
  1940.         _PowerPCBase - base of powerpc.library
  1941.         signalNum - the signal bit number to free (0..31). It's
  1942.                     safe to pass -1 as input parameter.
  1943.  
  1944.     SEE ALSO
  1945.         AllocSignalPPC, SetSignalPPC, SignalPPC, WaitPPC
  1946.  
  1947. powerpc.library/FreeVecPPC                          powerpc.library/FreeVecPPC
  1948.  
  1949.     NAME
  1950.         FreeVecPPC - frees memory allocated by AllocVecPPC (V7)
  1951.  
  1952.     CPU
  1953.         PowerPC
  1954.  
  1955.     SYNOPSIS
  1956.         status = FreeVecPPC(_PowerPCBase, memblock)
  1957.         r3                  r3            r4
  1958.  
  1959.         LONG FreeVecPPC(struct Library *, void *);
  1960.  
  1961.     FUNCTION
  1962.         Frees memory allocated by AllocVecPPC. This is the mirror function
  1963.         of exec/FreeVec.
  1964.  
  1965.     INPUTS
  1966.         _PowerPCBase - base of powerpc.library
  1967.         memblock - address of memory to be freed. It's safe to pass NULL
  1968.                    as input parameter.
  1969.  
  1970.     RESULT
  1971.         status - a status value:
  1972.             MEMERR_SUCCESS - operation was successful
  1973.  
  1974.     NOTES
  1975.         It is absolutely required that no part of the freed memory is
  1976.         located in the 68K data cache! This is only important if your
  1977.         application is working asynchronously and shares data between
  1978.         independent 68K and PPC tasks. Otherwise (for standard synchron
  1979.         applications) it is guaranteed that the 68K data cache doesn't
  1980.         contain parts of the freed memory.
  1981.  
  1982.         The same rules also apply to the reverse case (free memory
  1983.         using exec/FreeVec).
  1984.  
  1985.         Please remember, that you should never free memory, which was
  1986.         allocated by another task. This would break on any operating
  1987.         system with memory protection and will also break with the
  1988.         V15 memory management system of WarpOS.
  1989.  
  1990.     SEE ALSO
  1991.         AllocVecPPC, FreeAllMem, powerpc/memoryPPC.i
  1992.  
  1993. powerpc.library/FreeXMsgPPC                        powerpc.library/FreeXMsgPPC
  1994.  
  1995.     NAME
  1996.         FreeXMsgPPC - frees a message allocated with 'AllocXMsgPPC' (V12)
  1997.  
  1998.     CPU
  1999.         PowerPC
  2000.  
  2001.     SYNOPSIS
  2002.         FreeXMsgPPC(_PowerPCBase, message)
  2003.                      r3           r4
  2004.  
  2005.         void FreeXMsgPPC(struct Library *, struct Message *);
  2006.  
  2007.     FUNCTION
  2008.         This function frees a memory allocated using 'AllocXMsgPPC'.
  2009.  
  2010.     INPUTS
  2011.         _PowerPCBase - base of powerpc.library
  2012.         message - a message allocated by 'AllocXMsgPPC'.
  2013.  
  2014.     NOTES
  2015.         There were some restrictions in earlier versions using
  2016.         FreeXMsgPPC. Since V14, a XMessage created by AllocXMsgPPC can be
  2017.         freed either by another PPC task (if the message isn't used
  2018.         anymore) or by a 68K task using FreeXMsg.
  2019.  
  2020.     SEE ALSO
  2021.         AllocXMsgPPC, PutXMsgPPC
  2022.  
  2023. powerpc.library/GetHALInfo                          powerpc.library/GetHALInfo
  2024.  
  2025.     NAME
  2026.         GetHALInfo - evaluates some HAL related information (V14)
  2027.  
  2028.     CPU
  2029.         PowerPC
  2030.  
  2031.     SYNOPSIS
  2032.         GetHALInfo(_PowerPCBase, HALInfoTagList)
  2033.                    r3            r4
  2034.  
  2035.         void GetHALInfo(struct Library *, struct TagItem *);
  2036.  
  2037.     FUNCTION
  2038.         This function is able to evaluate some information related to
  2039.         the WarpUp-HAL' status. The values which should be evaluated are
  2040.         specified using the appropriate tags (defined in powerpc/powerpc.i)
  2041.         and the value is returned in the appropriate ti_Data field.
  2042.  
  2043.     INPUTS
  2044.         _PowerPCBase - base of powerpc.library
  2045.         HALInfoTagList - pointer to a tagitem array. The following tags are
  2046.                          supported:
  2047.             HINFO_ALEXC_HIGH:   returns the high-longword of a 64-bit-value
  2048.                                 showing the number of emulated alignment
  2049.                                 exceptions since the PowerPC was reset.
  2050.             HINFO_ALEXC_LOW:    returns the low-longword of a 64-bit-value
  2051.                                 showing the number of emulated alignment
  2052.                                 exceptions since the PowerPC was reset.
  2053.  
  2054.     NOTES
  2055.         If the number of emulated alignment exceptions should be evaluated
  2056.         for specific tasks, you should use the tc_Switch/tc_Launch fields
  2057.         of the WarpOS task structure to keep track of task switches.
  2058.  
  2059.         This function is safe to call from exception handlers.
  2060.  
  2061.     SEE ALSO
  2062.         powerpc/powerpc.i
  2063.  
  2064. powerpc.library/GetInfo                                powerpc.library/GetInfo
  2065.  
  2066.     NAME
  2067.         GetInfo - evaluates many CPU related information (V10)
  2068.  
  2069.     CPU
  2070.         PowerPC
  2071.  
  2072.     SYNOPSIS
  2073.         GetInfo(_PowerPCBase, PPCInfoTagList)
  2074.                 r3            r4
  2075.  
  2076.         void GetInfo(struct Library *, struct TagItem *);
  2077.  
  2078.     FUNCTION
  2079.         This function is able to evaluate many CPU related information
  2080.         such as CPU type, cache states and more. The values which should
  2081.         be evaluated are specified using the appropriate tags (defined
  2082.         in powerpc/powerpc.i) and the value is returned in the appropriate
  2083.         ti_Data field.
  2084.  
  2085.     INPUTS
  2086.         _PowerPCBase - base of powerpc.library
  2087.         PPCInfoTagList - pointer to a tagitem array. The following tags are
  2088.                          supported:
  2089.             PPCINFO_CPU:        evaluates the PowerPC CPU type (see powerpc/
  2090.                                 powerpc.i for a description of the possible
  2091.                                 return values)
  2092.             PPCINFO_PVR:        returns the PVR register which also contains
  2093.                                 the revision number of the CPU besides the
  2094.                                 CPU type.
  2095.             PPCINFO_ICACHE:     returns the state of the instruction cache
  2096.                                 See powerpc/powerpc.i for a description of
  2097.                                 the possible values.
  2098.             PPCINFO_DCACHE:     returns the state of the data cache. The
  2099.                                 values possible are the same as for PPCINFO_
  2100.                                 ICACHE.
  2101.             PPCINFO_PAGETABLE:  returns the location of the standard page table
  2102.             PPCINFO_TABLESIZE:  returns the size of the page table (in KBytes)
  2103.             PPCINFO_BUSCLOCK:   returns the bus clock value (in Hz)
  2104.             PPCINFO_CPUCLOCK:   returns the CPU clock value (in Hz)
  2105.  
  2106.     NOTES
  2107.         The CPU clock cannot be evaluated on PowerPC systems without the
  2108.         extension E (for example PPC603,PPC604) because the supervisor
  2109.         register HID1 is missing. In this case, 0 is returned.
  2110.  
  2111.         Usually the PPC-CPU's available for AMIGA will have this register
  2112.         (for example: PPC603E, PPC604E)
  2113.  
  2114.     SEE ALSO
  2115.         powerpc/powerpc.i
  2116.  
  2117. powerpc.library/GetMsgPPC                            powerpc.library/GetMsgPPC
  2118.  
  2119.     NAME
  2120.         GetMsgPPC - get next message from a message port (V11)
  2121.  
  2122.     CPU
  2123.         PowerPC
  2124.  
  2125.     SYNOPSIS
  2126.         message = GetMsgPPC(_PowerPCBase, MsgPortPPC)
  2127.         r3                  r3            r4
  2128.  
  2129.         struct Message *GetMsgPPC(struct Library *, struct MsgPortPPC *);
  2130.  
  2131.     FUNCTION
  2132.         This function receives a message from a given message port. This
  2133.         is the mirror function of exec/GetMsg.
  2134.  
  2135.     INPUTS
  2136.         _PowerPCBase - base of powerpc.library
  2137.         port - a pointer to a message port
  2138.  
  2139.     RESULTS
  2140.         message - a pointer to the first available message or NULL if none
  2141.                   is available.
  2142.  
  2143.     SEE ALSO
  2144.         WaitPortPPC, PutMsgPPC, ReplyMsgPPC, powerpc/portsPPC.i
  2145.  
  2146. powerpc.library/GetSysTimePPC                    powerpc.library/GetSysTimePPC
  2147.  
  2148.     NAME
  2149.         GetSysTimePPC - get the current (relative) time (V7)
  2150.  
  2151.     CPU
  2152.         PowerPC
  2153.  
  2154.     SYNOPSIS
  2155.         GetSysTimePPC(_PowerPCBase, Dest )
  2156.                             r3      r4
  2157.  
  2158.         void GetSysTimePPC(struct Library *, struct timeval * );
  2159.  
  2160.     FUNCTION
  2161.         Returns the current system time. This time is NOT absolute, there
  2162.         is no relation between the real time and the time returned by
  2163.         GetSysTimePPC. This function can be used for measurement of
  2164.         time spans.
  2165.  
  2166.         This is the mirror function of timer/GetSysTime.
  2167.  
  2168.     INPUTS
  2169.         _PowerPCBase - base of powerpc.library
  2170.         Dest - pointer to a timeval structure (where the time is stored)
  2171.  
  2172.     NOTES
  2173.         This function has different behaviour on powerpc.library V7 and
  2174.         powerpc.library V8+.
  2175.  
  2176.         V7: The time is evaluated using the timer.device (via a cross
  2177.         call) because it isn't possible to evaluate the busclock frequency
  2178.         of the PPC with V7 (and ppc.library below) until now.
  2179.  
  2180.         V8+: The time is evaluated completely native (and fast) using the
  2181.         internal timers and the busclock frequency evaluated by WarpOS.
  2182.  
  2183.         This function is safe to call from exception handlers ONLY in
  2184.         powerpc.library V8 and higher !!
  2185.  
  2186.     SEE ALSO
  2187.         AddTimePPC, SubTimePPC, CmpTimePPC
  2188.  
  2189. powerpc.library/GetTagDataPPC                    powerpc.library/GetTagDataPPC
  2190.  
  2191.     NAME
  2192.         GetTagDataPPC - obtain the data corresponding to a tag (V8)
  2193.  
  2194.     CPU
  2195.         PowerPC
  2196.  
  2197.     SYNOPSIS
  2198.         value = GetTagDataPPC(_PowerPCBase, tagValue, defaultVal, tagList)
  2199.         r3                    r3            r4        r5          r6
  2200.  
  2201.         ULONG *GetTagDataPPC(struct Library *, ULONG, ULONG, struct TagItem* );
  2202.  
  2203.     FUNCTION
  2204.         Searches a tag list for a matching tag and returns the corresponding
  2205.         ti_Data value for the TagItem found. If no match is found,
  2206.         this function returns the value passed in as 'defaultVal'. This
  2207.         is the mirror function of utility/GetTagData.
  2208.  
  2209.     INPUTS
  2210.         _PowerPCBase - base of powerpc.library
  2211.         tagValue - tag value to search for
  2212.         defaultVal - value to be returned if tagValue is not found
  2213.         tagList - tag item list to search (may be NULL)
  2214.  
  2215.     RESULT
  2216.         value - the ti_Data value for the first matching TagItem, or
  2217.                 'defaultVal' if a ti_Tag matching Tag is not found.
  2218.  
  2219.     NOTES
  2220.         This function is safe to call from exception handlers.
  2221.  
  2222.     SEE ALSO
  2223.         FindTagItemPPC, NextTagItemPPC, utility/tagitem.i
  2224.  
  2225. powerpc.library/GetTaskByID                        powerpc.library/GetTaskByID
  2226.  
  2227.     NAME
  2228.         GetTaskByID - evaluates the task address for a given task ID (V14)
  2229.  
  2230.     CPU
  2231.         PowerPC
  2232.  
  2233.     SYNOPSIS
  2234.         TaskPPC = GetTaskByID(_PowerPCBase, taskID)
  2235.         r3                    r3            r4
  2236.  
  2237.         ULONG *GetTagDataPPC(struct Library *, ULONG, ULONG, struct TagItem* );
  2238.  
  2239.     FUNCTION
  2240.         Searches a tag list for a matching tag and returns the corresponding
  2241.         ti_Data value for the TagItem found. If no match is found,
  2242.         this function returns the value passed in as 'defaultVal'. This
  2243.         is the mirror function of utility/GetTagData.
  2244.  
  2245.     INPUTS
  2246.         _PowerPCBase - base of powerpc.library
  2247.         tagValue - tag value to search for
  2248.         defaultVal - value to be returned if tagValue is not found
  2249.         tagList - tag item list to search (may be NULL)
  2250.  
  2251.     RESULT
  2252.         value - the ti_Data value for the first matching TagItem, or
  2253.                 'defaultVal' if a ti_Tag matching Tag is not found.
  2254.  
  2255.     NOTES
  2256.         This function is safe to call from exception handlers.
  2257.  
  2258.     SEE ALSO
  2259.         FindTagItemPPC, NextTagItemPPC, utility/tagitem.i
  2260.  
  2261. powerpc.library/InitSemaphorePPC              powerpc.library/InitSemaphorePPC
  2262.  
  2263.     NAME
  2264.         InitSemaphorePPC - initializes a signal semaphore (V8)
  2265.  
  2266.     CPU
  2267.         PowerPC
  2268.  
  2269.     SYNOPSIS
  2270.         status = InitSemaphorePPC(_PowerPCBase, SignalSemaphorePPC)
  2271.         r3                        r3            r4
  2272.  
  2273.         LONG InitSemaphorePPC(struct Library *, struct SignalSemaphorePPC *);
  2274.  
  2275.     FUNCTION
  2276.         Initializes a signal semaphore. This is the mirror function of
  2277.         exec/InitSemaphore with some changes.
  2278.  
  2279.     INPUTS
  2280.         _PowerPCBase - base of powerpc.library
  2281.         SignalSemaphorePPC - pointer to a signalsemaphorePPC structure
  2282.                              (all fields to zero)
  2283.  
  2284.     RESULT
  2285.         status - status value:
  2286.             SSPPC_SUCCESS: function was successful
  2287.             SSPPC_NOMEM: function failed due to lack of memory
  2288.  
  2289.     NOTES
  2290.         In opposite to exec/InitSemaphore a signal semaphore for PPC
  2291.         has to be freed with FreeSemaphorePPC, because InitSemaphorePPC
  2292.         allocates memory which should be freed after use.
  2293.  
  2294.     SEE ALSO
  2295.         FreeSemaphorePPC, ObtainSemaphorePPC, AttemptSemaphorePPC,
  2296.         ReleaseSemaphorePPC, AddSemaphorePPC, RemSemaphorePPC,
  2297.         FindSemaphorePPC, TrySemaphorePPC, powerpc/semaphoresPPC.i
  2298.  
  2299. powerpc.library/InsertPPC                            powerpc.library/InsertPPC
  2300.  
  2301.     NAME
  2302.         InsertPPC - insert a node into a list (V8)
  2303.  
  2304.     CPU
  2305.         PowerPC
  2306.  
  2307.     SYNOPSIS
  2308.         Insert(_PowerPCBase, list, node, nodepredecessor)
  2309.                r3            r4    r5    r6
  2310.  
  2311.         void InsertPPC(struct Library *, struct List*, struct Node*,
  2312.                        struct Node*);
  2313.  
  2314.     FUNCTION
  2315.         Insert a node into an standard exec list. This is the mirror
  2316.         function of exec/Insert.
  2317.  
  2318.     INPUTS
  2319.         _PowerPCBase - base of powerpc.library (can be omitted)
  2320.         list - a pointer to the target list
  2321.         node - the node to insert
  2322.         nodepredecessor - the node after which to insert. If 0 is passed,
  2323.                           the node is inserted at the head of the list.
  2324.  
  2325.     NOTES
  2326.         This function is guaranteed to work correctly, if the PowerPCBase
  2327.         is not passed in r3.
  2328.  
  2329.         This function is safe to call from exception handlers.
  2330.  
  2331.     SEE ALSO
  2332.         AddHeadPPC, AddTailPPC, RemovePPC, RemHeadPPC, RemTailPPC,
  2333.         EnqueuePPC, FindNamePPC, NewListPPC, powerpc/listsPPC.i
  2334.  
  2335. powerpc.library/LockTaskList                      powerpc.library/LockTaskList
  2336.  
  2337.     NAME
  2338.         LockTaskList - locks a list of all tasks (V10)
  2339.  
  2340.     CPU
  2341.         PowerPC
  2342.  
  2343.     SYNOPSIS
  2344.         TaskPtr = LockTaskList(_PowerPCBase)
  2345.         r3                     r3
  2346.  
  2347.         struct TaskPtr* LockTaskList(struct Library *);
  2348.  
  2349.     FUNCTION
  2350.         This function locks a list of all PPC tasks currently available.
  2351.         The main purpose of this function is to allow examining the
  2352.         PPCtask structures without to worry about protecting the access
  2353.         by semaphores (this is done internally).
  2354.  
  2355.         The usual method of accessing the task information is the
  2356.         following:
  2357.  
  2358.         - Lock the task list using 'LockTaskList'
  2359.         - Get the pointer to the first task (by reading out the entry
  2360.           TASKPTR_TASK of the returned TaskPtr structure)
  2361.         - Scan trough the list and read out all infomation you need until
  2362.           you find the end of the list
  2363.         - Unlock the list using 'UnLockTaskList'
  2364.  
  2365.     INPUTS
  2366.         _PowerPCBase - base of powerpc.library
  2367.  
  2368.     RESULTS
  2369.         TaskPtr - Ptr to the first node of a list of TaskPtr structures
  2370.                   (see powerpc/tasksppc.i)
  2371.  
  2372.     NOTES
  2373.         The WarpOS multitasking is NOT halted between LockTaskList and
  2374.         UnLockTaskList.
  2375.  
  2376.         No new tasks are created and no resources of removed tasks are
  2377.         freed between LockTaskList and UnLockTaskList. So don't lock the
  2378.         list for a too long time.
  2379.  
  2380.     SEE ALSO
  2381.         UnLockTaskList, powerpc/tasksppc.i
  2382.  
  2383. powerpc.library/ModifyFPExc                        powerpc.library/ModifyFPExc
  2384.  
  2385.     NAME
  2386.         ModifyFPExc - enables/disables specific floating point exceptions (V9)
  2387.  
  2388.     CPU
  2389.         PowerPC
  2390.  
  2391.     SYNOPSIS
  2392.         ModifyFPExc(_PowerPCBase, FPflags)
  2393.                     r3            r4
  2394.  
  2395.         void ModifyFPExc(struct Library *, ULONG);
  2396.  
  2397.     FUNCTION
  2398.         This function allows to enable/disable particular floating
  2399.         point exceptions. Multiple exceptions can be affected
  2400.         simultaneously.
  2401.  
  2402.     INPUTS
  2403.         _PowerPCBase - base of powerpc.library
  2404.         FPflags - action to be performed:
  2405.             FPF_EN_OVERFLOW:    Enables FP overflow exception
  2406.             FPF_EN_UNDERFLOW:   Enables FP underflow exception
  2407.             FPF_EN_ZERODIVIDE:  Enables FP zero divide exception
  2408.             FPF_EN_INEXACT:     Enables FP inexact operation exception
  2409.             FPF_EN_INVALID:     Enables FP invalid operation exception
  2410.             FPF_DIS_OVERFLOW:   Disables FP overflow exception
  2411.             FPF_DIS_UNDERFLOW:  Disables FP underflow exception
  2412.             FPF_DIS_ZERODIVIDE: Disables FP zero divide exception
  2413.             FPF_DIS_INEXACT:    Disables FP inexact operation exception
  2414.             FPF_DIS_INVALID:    Disables FP invalid operation exception
  2415.  
  2416.     NOTES
  2417.         Floating point exceptions must be enabled globally using 'SetHardware'
  2418.         otherwise this function doesn't have any effect.
  2419.  
  2420.     SEE ALSO
  2421.         SetHardware, powerpc/powerpc.i
  2422.  
  2423. powerpc.library/NewListPPC                          powerpc.library/NewListPPC
  2424.  
  2425.     NAME
  2426.         NewListPPC - initialize an exec-style linked list (V15)
  2427.  
  2428.     CPU
  2429.         PowerPC
  2430.  
  2431.     SYNOPSIS
  2432.         NewListPPC(_PowerPCBase, list)
  2433.                    r3            r4
  2434.  
  2435.         void NewListPPC(struct Library *, struct List *);
  2436.  
  2437.     FUNCTION
  2438.         Initializes an exec-style linked-list
  2439.  
  2440.         This is the mirror function of amiga.lib/NewList
  2441.  
  2442.     INPUTS
  2443.         _PowerPCBase - base of powerpc.library
  2444.         list - the exec-style linked list to be initialized
  2445.  
  2446.     NOTES
  2447.         This function is safe to call from exception handlers.
  2448.  
  2449.     SEE ALSO
  2450.         InsertPPC, AddTailPPC, RemovePPC, RemHeadPPC, RemTailPPC,
  2451.         EnqueuePPC, FindNamePPC, AddHeadPPC, powerpc/listsPPC.i
  2452.  
  2453. powerpc.library/NextTagItemPPC                  powerpc.library/NextTagItemPPC
  2454.  
  2455.     NAME
  2456.         NextTagItemPPC - iterate through a tag list (V8)
  2457.  
  2458.     CPU
  2459.         PowerPC
  2460.  
  2461.     SYNOPSIS
  2462.         tag = NextTagItemPPC(_PowerPCBase, tagItemPtr)
  2463.         r3                   r3            r4
  2464.  
  2465.         struct TagItem *NextTagItemPPC(struct Library *, struct TagItem **);
  2466.  
  2467.     FUNCTION
  2468.         Iterates through a tag list, skipping and chaining as dictated by
  2469.         system tags. Each call returns either the next item to be examined
  2470.         or NULL when the end of the list has benn reached. This is the
  2471.         mirror function of utility/NextTagItem.
  2472.  
  2473.     INPUTS
  2474.         _PowerPCBase - base of powerpc.library
  2475.         tagItemPtr - double-indirect reference to a TagItem structure.
  2476.                      The pointer will be changed to keep track of the
  2477.                      iteration.
  2478.  
  2479.     RESULT
  2480.         tag - each TagItem in the array that should be processed is
  2481.               returned in turn with succesive calls.
  2482.  
  2483.     NOTES
  2484.         This function is safe to call from exception handlers.
  2485.  
  2486.     SEE ALSO
  2487.         FindTagItemPPC, GetTagDataPPC, utility/tagitem.i
  2488.  
  2489. powerpc.library/ObtainSemaphorePPC          powerpc.library/ObtainSemaphorePPC
  2490.  
  2491.     NAME
  2492.         ObtainSemaphorePPC - gain exclusive access to a semaphore (V8)
  2493.  
  2494.     CPU
  2495.         PowerPC
  2496.  
  2497.     SYNOPSIS
  2498.         ObtainSemaphorePPC(_PowerPCBase, SignalSemaphorePPC)
  2499.                            r3            r4
  2500.  
  2501.         void ObtainSemaphorePPC(struct Library *, struct SignalSemaphorePPC *);
  2502.  
  2503.     FUNCTION
  2504.         Tries to get exclusive access to a signal semaphore. If the semaphore
  2505.         is occupied, the task adds itself into a waiting queue. This is the
  2506.         mirror function of exec/ObtainSemaphore.
  2507.  
  2508.     INPUTS
  2509.         _PowerPCBase - base of powerpc.library
  2510.         SignalSemaphorePPC - pointer to a signalsemaphorePPC structure
  2511.  
  2512.     NOTES
  2513.         This call is guaranteed to preserve all GPR (except r0) and the CTR.
  2514.  
  2515.     SEE ALSO
  2516.         InitSemaphorePPC, FreeSemaphorePPC, AttemptSemaphorePPC,
  2517.         ReleaseSemaphorePPC, AddSemaphorePPC, RemSemaphorePPC
  2518.         FindSemaphorePPC, TrySemaphorePPC, powerpc/semaphoresPPC.i
  2519.  
  2520. powerpc.library/ObtainSemaphoreSharedPPC  powerpc.library/ObtainSemaphoreSharedPPC
  2521.  
  2522.     NAME
  2523.         ObtainSemaphoreSharedPPC - gain shared access to a semaphore (V15)
  2524.  
  2525.     CPU
  2526.         PowerPC
  2527.  
  2528.     SYNOPSIS
  2529.         ObtainSemaphoreSharedPPC(_PowerPCBase, SignalSemaphorePPC)
  2530.                                  r3            r4
  2531.  
  2532.         void ObtainSemaphoreSharedPPC(struct Library *,
  2533.                                       struct SignalSemaphorePPC *);
  2534.  
  2535.     FUNCTION
  2536.         Tries to get shared access to a signal semaphore. This is the mirror
  2537.         function of exec/ObtainSemaphoreShared. See the documentation
  2538.         of exec/ObtainSemaphoreShared for more infos.
  2539.  
  2540.     INPUTS
  2541.         _PowerPCBase - base of powerpc.library
  2542.         SignalSemaphorePPC - pointer to a signalsemaphorePPC structure
  2543.  
  2544.     NOTES
  2545.         This call is guaranteed to preserve all GPR (except r0) and the CTR.
  2546.  
  2547.     SEE ALSO
  2548.         ObtainSemaphorePPC, AttemptSemaphoreSharedPPC, powerpc/semaphoresPPC.i
  2549.  
  2550. powerpc.library/ProcurePPC                          powerpc.library/ProcurePPC
  2551.  
  2552.     NAME
  2553.         ProcurePPC - bid for a semaphore (V15)
  2554.  
  2555.     CPU
  2556.         PowerPC
  2557.  
  2558.     SYNOPSIS
  2559.         ProcurePPC(_PowerPCBase, SignalSemaphorePPC, SemaphoreMessage)
  2560.                    r3            r4                  r5
  2561.  
  2562.         void ProcurePPC(struct Library *,
  2563.                         struct SignalSemaphorePPC *, struct SemaphoreMessage *);
  2564.  
  2565.     FUNCTION
  2566.         Allows to obtain semaphores asynchronously and allows to wait
  2567.         for multiple semaphores at once. This is the mirror function of
  2568.         exec/Procure. See the documentation of exec/Procure for more
  2569.         infos.
  2570.  
  2571.         Note, that ProcurePPC is implemented according to exec V39/V40
  2572.         behaviour of Procure.
  2573.  
  2574.     INPUTS
  2575.         _PowerPCBase - base of powerpc.library
  2576.         SignalSemaphorePPC - pointer to a signalsemaphorePPC structure
  2577.         bidMessage- SemaphoreMessage that you wish replied when
  2578.                 you obtain access to the semaphore.  The message's
  2579.                 ssm_Semaphore field will point at the semaphore that
  2580.                 was obtained.  If the ssm_Semaphore field is NULL,
  2581.                 the Procure() was aborted via Vacate.
  2582.                 The mn_ReplyPort field of the message must point to
  2583.                 a valid message port.
  2584.                 To obtain a shared semaphore, the ln_Name field
  2585.                 must be set to 1.  For an exclusive lock, the ln_Name
  2586.                 field must be 0.  No other values are valid.
  2587.  
  2588.     SEE ALSO
  2589.         VacatePPC, powerpc/semaphoresPPC.i
  2590.  
  2591. powerpc.library/PutMsgPPC                            powerpc.library/PutMsgPPC
  2592.  
  2593.     NAME
  2594.         PutMsgPPC - put a message to a message port (V11)
  2595.  
  2596.     CPU
  2597.         PowerPC
  2598.  
  2599.     SYNOPSIS
  2600.         PutMsgPPC(_PowerPCBase, MsgPortPPC, message)
  2601.                   r3            r4          r5
  2602.  
  2603.         void PutMsgPPC(struct Library *, struct MsgPortPPC *, struct Messge *);
  2604.  
  2605.     FUNCTION
  2606.         This function attaces a message to the end of the given port. In
  2607.         opposition to exec/PutMsg, only ports with PA_SIGNAL are supported.
  2608.         This is the mirror function of exec/PutMsg.
  2609.  
  2610.     INPUTS
  2611.         _PowerPCBase - base of powerpc.library
  2612.         port - a pointer to a message port
  2613.         message - a pointer to the message to be sent
  2614.  
  2615.     NOTES
  2616.         This function is safe to call from exception handlers.
  2617.  
  2618.     SEE ALSO
  2619.         WaitPortPPC, GetMsgPPC, ReplyMsgPPC, powerpc/portsPPC.i
  2620.  
  2621. powerpc.library/PutXMsgPPC                          powerpc.library/PutXMsgPPC
  2622.  
  2623.     NAME
  2624.         PutXMsgPPC - sends an Inter-CPU message to a 68K task (V12)
  2625.  
  2626.     CPU
  2627.         PowerPC
  2628.  
  2629.     SYNOPSIS
  2630.         PutXMsgPPC(_PowerPCBase, MsgPort, message)
  2631.                    r3            r4       r5
  2632.  
  2633.         void PutXMsgPPC(struct Library *, struct MsgPort *, struct Message *);
  2634.  
  2635.     FUNCTION
  2636.         This function sends an Inter-CPU message allocated by 'AllocXMsgPPC'
  2637.         to a 68K task.
  2638.  
  2639.     INPUTS
  2640.         _PowerPCBase - base of powerpc.library
  2641.         MsgPort - an exec message port
  2642.         message - a message allocated by 'AllocXMsgPPC'.
  2643.  
  2644.     NOTES
  2645.         Inter-CPU must NOT be used for internal communication. They can
  2646.         only be used for communication between tasks on different processors.
  2647.  
  2648.         Inter-CPU messages get a different node type, if they are
  2649.         sent. If you want to filter out Reply-Messages from standard
  2650.         or Inter-CPU messages, compare the LN_TYPE field to NT_REPLYMSG.
  2651.         Replied Inter-CPU messages still get the same node type
  2652.         (NT_REPLYMSG). Any assumptions about the value of the new
  2653.         node type are ILLEGAL!!
  2654.  
  2655.         As soon as an Inter-CPU message is sent, the PPC looses ownership
  2656.         over the message. No access to the message is allowed until the
  2657.         reply has been arrived. If no replyport was specified, it's
  2658.         allowed to free the message, after it was read from the other side.
  2659.  
  2660.         Inter-CPU messages can be reused if they have been replied.
  2661.  
  2662.         Inter-CPU messages are read and replied using the standard
  2663.         message handling mechanisms (exec/WaitPort,exec/GetMsg,exec/ReplyMsg
  2664.         for 68K, powerpc/WaitPortPPC, powerpc/GetMsgPPC, powerpc/ReplyMsgPPC
  2665.         for PPC).
  2666.  
  2667.         The receiving task must NOT access message data, which are not
  2668.         explicitely located in the message body (for example data which is
  2669.         referenced by a pointer) unless both tasks care for the cache
  2670.         consistency. Only the message itself is flushed/invalidated
  2671.         automatically by the system.
  2672.  
  2673.         The receiving task may write to the message body of an Inter-CPU
  2674.         message.
  2675.  
  2676.     SEE ALSO
  2677.         AllocXMsgPPC, FreeXMsgPPC
  2678.  
  2679. powerpc.library/RawDoFmtPPC                        powerpc.library/RawDoFmtPPC
  2680.  
  2681.     NAME
  2682.         RawDoFmtPPC -- format data into a character stream (V15)
  2683.  
  2684.     CPU
  2685.         PowerPC
  2686.  
  2687.     SYNOPSIS
  2688.         NextData = RawDoFmtPPC(_PowerPCBase, FormatString, DataStream, PutChProc,
  2689.         r3                     r3            r4            r5          r6
  2690.                                PutChData)
  2691.                                r7
  2692.  
  2693.         APTR RawDoFmtPPC(struct Library*, STRPTR, APTR, void (*)(),APTR);
  2694.  
  2695.     FUNCTION
  2696.         perform "C"-language-like formatting of a data stream, outputting
  2697.         the result a character at a time. This function is the mirror function
  2698.         of exec/RawDoFmt, please refer to the appropriate documentation for
  2699.         more infos.
  2700.  
  2701.         Note, that RawDoFmtPPC provides some additional features, as
  2702.         described below when explaining the PutChProc parameter.
  2703.  
  2704.     INPUTS
  2705.         _PowerPCBase - base of powerpc.library
  2706.         FormatString - a "C"-language-like NULL terminated format string.
  2707.                        see exec/RawDoFmt for more infos.
  2708.         DataStream - a stream of data that is interpreted according to
  2709.                      the format string.
  2710.         PutChProc  - the procedure to call with each character to be
  2711.                      output, called as:
  2712.  
  2713.                      PutChData = PutChProc(PutChData, Char);
  2714.                      r3                    r3         r4
  2715.  
  2716.                      the procedure is called with a NULL Char at the end of
  2717.                      the format string.
  2718.  
  2719.                      RawDoFmtPPC provides the following advanced features,
  2720.                      which exec/RawDoFmt doesn't provide:
  2721.  
  2722.                      - if PutChProc is set to 0, then all characters are
  2723.                        printed to the buffer pointed to by the 'PutChData'
  2724.                        parameter.
  2725.                      - if PutChProc is set to 1, then this function does
  2726.                        nothing.
  2727.  
  2728.         PutChData - a value that is passed through to the PutChProc
  2729.                     procedure. Note, that this parameter has a
  2730.                     special meaning, if 'PutChProc' is set to 0.
  2731.  
  2732.     RESULT
  2733.         NextData - a pointer to the end of the DataStream (The next argument
  2734.         that would have been processed).  This allows multiple formatting
  2735.         passes to be made using the same data.
  2736.  
  2737. powerpc.library/ReleaseSemaphorePPC        powerpc.library/ReleaseSemaphorePPC
  2738.  
  2739.     NAME
  2740.         ReleaseSemaphorePPC - make signal semaphore available to others (V8)
  2741.  
  2742.     CPU
  2743.         PowerPC
  2744.  
  2745.     SYNOPSIS
  2746.         ReleaseSemaphorePPC(_PowerPCBase, SignalSemaphorePPC)
  2747.                             r3            r4
  2748.  
  2749.         void ReleaseSemaphorePPC(struct Library *,
  2750.                                  struct SignalSemaphorePPC *);
  2751.  
  2752.     FUNCTION
  2753.         Releases a semaphore locked by either ObtainSemaphorePPC or
  2754.         AttemptSemaphorePPC. If other tasks are waiting, the foremost
  2755.         in the waiting queue is waked up.
  2756.  
  2757.     INPUTS
  2758.         _PowerPCBase - base of powerpc.library
  2759.         SignalSemaphorePPC - pointer to a signalsemaphorePPC structure
  2760.  
  2761.     NOTES
  2762.         This call is guaranteed to preserve all GPR (except r0) and the CTR.
  2763.  
  2764.         If the semaphore is in an illegal state after calling
  2765.         ReleaseSemaphorePPC, a system message will appear and the task is
  2766.         put into waiting state.
  2767.  
  2768.     SEE ALSO
  2769.         InitSemaphorePPC, FreeSemaphorePPC, ObtainSemaphorePPC,
  2770.         AttemptSemaphorePPC, AddSemaphorePPC, RemSemaphorePPC
  2771.         FindSemaphorePPC, TrySemaphorePPC, powerpc/semaphoresPPC.i
  2772.  
  2773. powerpc.library/RemExcHandler                    powerpc.library/RemExcHandler
  2774.  
  2775.     NAME
  2776.         RemExcHandler - removes a custom exception handler (V9)
  2777.  
  2778.     CPU
  2779.         PowerPC
  2780.  
  2781.     SYNOPSIS
  2782.         RemExcHandler(_PowerPCBase, XLock)
  2783.                       r3            r4
  2784.  
  2785.         void RemExcHandler(struct Library *, void *);
  2786.  
  2787.     FUNCTION
  2788.         Removes an exception handler inserted by the function SetExcHandler.
  2789.  
  2790.     INPUTS
  2791.         _PowerPCBase - base of powerpc.library
  2792.         XLock - The lock value returned by SetExcHandler. It's safe to pass
  2793.                 NULL as parameter
  2794.  
  2795.     SEE ALSO
  2796.         RemExcHandler, powerpc/powerpc.i
  2797.  
  2798. powerpc.library/RemHeadPPC                          powerpc.library/RemHeadPPC
  2799.  
  2800.     NAME
  2801.         RemHeadPPC - removes the head node from a list (V8)
  2802.  
  2803.     CPU
  2804.         PowerPC
  2805.  
  2806.     SYNOPSIS
  2807.         node = RemHeadPPC(_PowerPCBase, list)
  2808.         r3                r3            r4
  2809.  
  2810.         struct Node *RemHeadPPC(struct Library *, struct List*);
  2811.  
  2812.     FUNCTION
  2813.         Removes the head node of a list. This is the mirror function of
  2814.         exec/RemHead.
  2815.  
  2816.     INPUTS
  2817.         _PowerPCBase - base of powerpc.library (can be omitted)
  2818.         list - the target list from which the head node should be removed
  2819.  
  2820.     RESULT
  2821.         node - the node removed or 0 if the list was empty
  2822.  
  2823.     NOTES
  2824.         This function is guaranteed to work correctly, if the PowerPCBase
  2825.         is not passed in r3.
  2826.  
  2827.         Assembler programmers may use the macro _REMHEAD located in
  2828.         'powerpc/listsPPC.i'
  2829.  
  2830.         This function is safe to call from exception handlers.
  2831.  
  2832.     SEE ALSO
  2833.         InsertPPC, AddTailPPC, AddHeadPPC, RemovePPC, RemTailPPC,
  2834.         EnqueuePPC, FindNamePPC, NewListPPC, powerpc/listsPPC.i
  2835.  
  2836. powerpc.library/RemovePPC                            powerpc.library/RemovePPC
  2837.  
  2838.     NAME
  2839.         RemovePPC - removes a node from a list (V8)
  2840.  
  2841.     CPU
  2842.         PowerPC
  2843.  
  2844.     SYNOPSIS
  2845.         RemovePPC(_PowerPCBase, node)
  2846.                    r3           r4
  2847.  
  2848.         void RemovePPC(struct Library *, struct Node*);
  2849.  
  2850.     FUNCTION
  2851.         Removes a node from whatever list it is in. This is the mirror
  2852.         function of exec/Remove.
  2853.  
  2854.     INPUTS
  2855.         _PowerPCBase - base of powerpc.library (can be omitted)
  2856.         node - the node to remove
  2857.  
  2858.     NOTES
  2859.         This function is guaranteed to work correctly, if the PowerPCBase
  2860.         is not passed in r3.
  2861.  
  2862.         Assembler programmers may use the macro _REMOVE located in
  2863.         'powerpc/listsPPC.i'
  2864.  
  2865.         This function is safe to call from exception handlers.
  2866.  
  2867.     SEE ALSO
  2868.         InsertPPC, AddTailPPC, AddHeadPPC, RemHeadPPC, RemTailPPC,
  2869.         EnqueuePPC, FindNamePPC, NewListPPC, powerpc/listsPPC.i
  2870.  
  2871. powerpc.library/RemPortPPC                          powerpc.library/RemPortPPC
  2872.  
  2873.     NAME
  2874.         RemPortPPC - removes a public PPC message port from the system (V11)
  2875.  
  2876.     CPU
  2877.         PowerPC
  2878.  
  2879.     SYNOPSIS
  2880.         RemPortPPC(_PowerPCBase, MsgPortPPC)
  2881.                    r3            r4
  2882.  
  2883.         void RemPortPPC(struct Library *, struct MsgPortPPC *);
  2884.  
  2885.     FUNCTION
  2886.         This function removes a public message port from the global list
  2887.         of message ports. It is the mirror function of exec/RemPort.
  2888.  
  2889.     INPUTS
  2890.         _PowerPCBase - base of powerpc.library
  2891.         MsgPortPPC - pointer to a PPC message port. It's safe to pass a NULL
  2892.                      parameter.
  2893.  
  2894.     SEE ALSO
  2895.         CreateMsgPortPPC,DeleteMsgPortPPC,FindPortPPC,AddPortPPC
  2896.         powerpc/portsPPC.i
  2897.  
  2898. powerpc.library/RemTailPPC                          powerpc.library/RemTailPPC
  2899.  
  2900.     NAME
  2901.         RemTailPPC - removes the tail node from a list (V8)
  2902.  
  2903.     CPU
  2904.         PowerPC
  2905.  
  2906.     SYNOPSIS
  2907.         node = RemTailPPC(_PowerPCBase, list)
  2908.         r3                r3            r4
  2909.  
  2910.         struct Node *RemTailPPC(struct Library *, struct List*);
  2911.  
  2912.     FUNCTION
  2913.         Removes the tail node of a list. This is the mirror function of
  2914.         exec/RemTail.
  2915.  
  2916.     INPUTS
  2917.         _PowerPCBase - base of powerpc.library (can be omitted)
  2918.         list - the target list from which the tail node should be removed
  2919.  
  2920.     RESULT
  2921.         node - the node removed or 0 if the list was empty
  2922.  
  2923.     NOTES
  2924.         This function is guaranteed to work correctly, if the PowerPCBase
  2925.         is not passed in r3.
  2926.  
  2927.         Assembler programmers may use the macro _REMTAIL located in
  2928.         'powerpc/listsPPC.i'
  2929.  
  2930.         This function is safe to call from exception handlers.
  2931.  
  2932.     SEE ALSO
  2933.         InsertPPC, AddTailPPC, AddHeadPPC, RemovePPC, RemHeadPPC,
  2934.         EnqueuePPC, FindNamePPC, NewListPPC, powerpc/listsPPC.i
  2935.  
  2936. powerpc.library/RemSemaphorePPC                powerpc.library/RemSemaphorePPC
  2937.  
  2938.     NAME
  2939.         RemSemaphorePPC - removes a global signal semaphore (V8)
  2940.  
  2941.     CPU
  2942.         PowerPC
  2943.  
  2944.     SYNOPSIS
  2945.         RemSemaphorePPC(_PowerPCBase, SignalSemaphorePPC)
  2946.                         r3            r4
  2947.  
  2948.         void RemSemaphorePPC(struct Library *, struct SignalSemaphorePPC *);
  2949.  
  2950.     FUNCTION
  2951.         Removes a global signal semaphore created by AddSemaphorePPC. This
  2952.         is the mirror function of exec/RemSemaphore.
  2953.  
  2954.     INPUTS
  2955.         _PowerPCBase - base of powerpc.library
  2956.         SignalSemaphorePPC - pointer to a signalsemaphorePPC structure
  2957.  
  2958.     SEE ALSO
  2959.         InitSemaphorePPC, FreeSemaphorePPC, ObtainSemaphorePPC,
  2960.         AttemptSemaphorePPC, ReleaseSemaphorePPC, AddSemaphorePPC,
  2961.         FindSemaphorePPC, TrySemaphorePPC, powerpc/semaphoresPPC.i
  2962.  
  2963. powerpc.library/ReplyMsgPPC                        powerpc.library/ReplyMsgPPC
  2964.  
  2965.     NAME
  2966.         ReplyMsgPPC - put a message to its reply port (V11)
  2967.  
  2968.     CPU
  2969.         PowerPC
  2970.  
  2971.     SYNOPSIS
  2972.         ReplyMsgPPC(_PowerPCBase, message)
  2973.                     r3            r4
  2974.  
  2975.         void ReplyMsgPPC(struct Library *, struct Messge *);
  2976.  
  2977.     FUNCTION
  2978.         This function sends a message to its reply port, if one is present.
  2979.         This is the mirror function of exec/ReplyMsg.
  2980.  
  2981.     INPUTS
  2982.         _PowerPCBase - base of powerpc.library
  2983.         message - a pointer to the message to be replied
  2984.  
  2985.     NOTES
  2986.         This function is safe to call from exception handlers.
  2987.  
  2988.     SEE ALSO
  2989.         WaitPortPPC, PutMsgPPC, GetMsgPPC, powerpc/portsPPC.i
  2990.  
  2991. powerpc.library/Run68K                                  powerpc.library/Run68K
  2992.  
  2993.     NAME
  2994.         Run68K - runs a 680x0 function resp. AMIGA-OS library function (V7)
  2995.  
  2996.     CPU
  2997.         PowerPC
  2998.  
  2999.     SYNOPSIS
  3000.         status = Run68K(_PowerPCBase, PPStruct )
  3001.         r3              r3           r4
  3002.  
  3003.         LONG RunPPC (struct Library *, struct PowerPC *);
  3004.  
  3005.     FUNCTION
  3006.         Runs a 680x0 function or an AMIGA-OS library function. All registers
  3007.         can be transferred to 68K as well as parameters on stack. All cache
  3008.         management actions are handled automatically.
  3009.  
  3010.         All registers are transferred back from 68K after the 68K call
  3011.         is completed. They are stored in the PowerPC structure.
  3012.  
  3013.         See RunPPC for the register assignment.
  3014.  
  3015.     INPUTS
  3016.         _PowerPCBase - base of powerpc.library
  3017.         PPStruct - Pointer to an initialized PowerPC Structure
  3018.  
  3019.           PP_CODE       : Pointer to the 680x0 code resp. pointer to the
  3020.                           library base (if PP_OFFSET is not zero).
  3021.           PP_OFFSET     : Library offset or 0 if no library function is
  3022.                           called.
  3023.           PP_FLAGS      : Flags which can be ore'd together
  3024.           - PP[F/P]_ASYNC   : call 68K function asynchronely (PPC process
  3025.                               returns immediately)
  3026.           PP_STACKPTR   : Pointer to the arguments on the stack to be
  3027.                           transferred. The pointer must point to the top
  3028.                           of the calling process' stackframe. The stack area
  3029.                           to be transferred is located at offset 24 from this
  3030.                           position. If no arguments on stack should be
  3031.                           transferred, set this to zero.
  3032.           PP_STACKSIZE  : Size of the stack area to be transferred. If no
  3033.                           stack parameters should be transferred, set this
  3034.                           to zero.
  3035.           PP_REGS       : Array of longwords where the registers to be
  3036.                           transferred can be stored (d0-a6)
  3037.           PP_FREGS      : Array of quadwords (8 bytes) where the FP-registers
  3038.                           to be transferred can be stored (fp0-fp7)
  3039.  
  3040.     RESULT
  3041.         status - PPERR_SUCCESS if the call was successfully
  3042.                  PPERR_ASYNCERR if a synchrone 68K call was made after an
  3043.                                 asynchrone 68K call
  3044.  
  3045.     NOTES
  3046.         Calling a 68K function asynchronely is dangerous. Take care of
  3047.         possible cache conflicts. Avoid calling system functions as much
  3048.         as possible.
  3049.  
  3050.         If an asynchrone 68K call is done, the function WaitFor68K MUST be
  3051.         called ONCE after the call was done. No other 68K call is allowed
  3052.         for this PPC process after an asynchrone 68K call and before a call
  3053.         to WaitFor68K.
  3054.  
  3055.         If an asynchronely called 68K function performs a PPC call, the call
  3056.         is only performed when WaitFor68K is called by the PPC process. Note
  3057.         that the 68K mirror process is still connected to the calling PPC
  3058.         process.
  3059.  
  3060.         DON'T pass arguments on stack when calling a 68K function asynchronely.
  3061.         The stack is most likely to be trashed before it is copied to the 68K
  3062.         stack.
  3063.  
  3064.         Assembler programmers should use the macros RUN68K and
  3065.         RUN68K_XL located in the include file 'powerpc/powerpc.i'
  3066.  
  3067.     SEE ALSO
  3068.         WaitFor68K,powerpc/powerpc.i
  3069.  
  3070. powerpc.library/SetCache                              powerpc.library/SetCache
  3071.  
  3072.     NAME
  3073.         SetCache - cache manipulation function (V8)
  3074.  
  3075.     CPU
  3076.         PowerPC
  3077.  
  3078.     SYNOPSIS
  3079.         SetCache(_PowerPCBase, cacheflags, start, length)
  3080.                  r3            r4          r5     r6
  3081.  
  3082.         void SetCache(struct Library *, ULONG, void *, ULONG);
  3083.  
  3084.     FUNCTION
  3085.         This function offers many possibilities to affect the caches of
  3086.         the PPC. It performs the action defined by the cache flags. Only
  3087.         one action can be performed at the same time.
  3088.  
  3089.     INPUTS
  3090.         _PowerPCBase - base of powerpc.library
  3091.         cacheflags - action to be performed:
  3092.             CACHE_DCACHEOFF:    Data cache is disabled. The Cache is flushed
  3093.                                 automatically.
  3094.             CACHE_DCACHEON:     Data cache is enabled.
  3095.             CACHE_DCACHELOCK:   Data cache is locked (is ignored if either
  3096.                                 'start' or 'length' is zero).
  3097.             CACHE_DCACHEUNLOCK: Data cache is unlocked.
  3098.             CACHE_DCACHEFLUSH:  Data cache is flushed.
  3099.             CACHE_ICACHEOFF:    Instruction cache is disabled.
  3100.             CACHE_ICACHEON:     Instruction cache is enabled.
  3101.             CACHE_ICACHELOCK:   Instruction cache is locked.
  3102.             CACHE_ICACHEUNLOCK: Instruction cache is unlocked.
  3103.             CACHE_ICACHEINV:    Instruction cache is invalidated.
  3104.             CACHE_DCACHEINV:    Data cache is invalidated (V15)
  3105.  
  3106.         start - pointer to the start address of the area to be affected.
  3107.                 The following cacheflags support an area specification:
  3108.                 CACHE_DCACHELOCK, CACHE_DCACHEFLUSH, CACHE_ICACHEINV,
  3109.                 CACHE_DCACHEINV
  3110.  
  3111.                 if 'start' is 0 the whole address space is affected
  3112.  
  3113.         length - length of the area to be affected (see above for the
  3114.                  cache flags which support area specification).
  3115.                  if 'length' is 0 the whole address space is affected
  3116.  
  3117.     NOTES
  3118.         Invalidating the whole instruction cache is much more efficient
  3119.         than flushing only a part of it.
  3120.  
  3121.         Flushing the whole data cache is less efficient than flushing
  3122.         a specific area, if this area is not too large.
  3123.  
  3124.         The cacheflag DCACHELOCK requires 'start' and 'length' to be not
  3125.         zero. The area specified is then copied into the data cache and
  3126.         the data cache is locked afterwards.
  3127.  
  3128.         The caches should not be switched on/off resp. locked/unlocked
  3129.         without GOOD justification. Global manipulations of the cache
  3130.         should be avoided. Better affect the cache locally by using
  3131.         AllocVecPPC.
  3132.  
  3133.         Never use CACHE_DCACHEINV, except if you are completely aware of
  3134.         the consequences of your doing.
  3135.  
  3136.         This function is safe to call from exception handlers
  3137.  
  3138.     SEE ALSO
  3139.         powerpc/powerpc.i
  3140.  
  3141. powerpc.library/SetExceptPPC                      powerpc.library/SetExceptPPC
  3142.  
  3143.     NAME
  3144.         SetExceptPPC -- define certain signals to cause exceptions (V15)
  3145.  
  3146.     CPU
  3147.         PowerPC
  3148.  
  3149.     SYNOPSIS
  3150.         oldSignals = SetExceptPPC(_PowerPCBase, newSignals, signalMask, flag)
  3151.         r3                        r3            r4          r5          r6
  3152.  
  3153.         ULONG SetExceptPPC(struct Library*, ULONG, ULONG, ULONG);
  3154.  
  3155.     FUNCTION
  3156.         This function defines which of the task's signals will cause a
  3157.         private task exception.  When any of the signals occurs the task's
  3158.         exception handler will be dispatched.  If the signal occurred prior
  3159.         to calling SetExcept, the exception will happen immediately.
  3160.  
  3161.         The user function pointed to by the task's tc_ExceptCode gets
  3162.         called as:
  3163.  
  3164.             newExcptSet = <exceptCode>(signals, exceptData)
  3165.             r3                         r3       r2
  3166.  
  3167.             signals - The set of signals that caused this exception.  These
  3168.                 Signals have been disabled from the current set of signals
  3169.                 that can cause an exception.
  3170.  
  3171.             exceptData - A copy of the task structure tc_ExceptData field,
  3172.                          if the parameter 'flag' is set to 0. Otherwise the
  3173.                          calling task's r2 content is passed in 'exceptData'.
  3174.  
  3175.             newExcptSet - The set of signals in NewExceptSet will be re-
  3176.                 enabled for exception generation.  Usually this will be the
  3177.                 same as the Signals that caused the exception.
  3178.  
  3179.         This is the mirror function of exec/SetExcept.
  3180.  
  3181.         Important: There are some differences between exec/SetExcept and
  3182.         powerpc/SetExceptPPC:
  3183.  
  3184.         -  SetExceptPPC knows an additional flag parameter, which allows
  3185.            to pass the calling task's r2 to the exception in r2.
  3186.         -  The exception handler is executed in exception context, in
  3187.            supervisor mode, in contrary to the 68K handlers, which are
  3188.            executed in normal user mode.
  3189.  
  3190.     INPUTS
  3191.         _PowerPCBase - base of powerpc.library
  3192.         newSignals - the new values for the signals specified in signalMask.
  3193.         signalMask - the set of signals to be effected
  3194.         flag - if 0, then the value of tc_ExceptData is passed in r2 to the
  3195.                exception handler. Otherwise the calling task's r2 is passed
  3196.                in r2 to the exception handler, which allows the handler
  3197.                to access the calling task's variables.
  3198.  
  3199.     RESULTS
  3200.         oldSignals - the prior exception signals
  3201.  
  3202.     NOTES
  3203.         The task's exception handler is executed in a PPC exception context,
  3204.         in supervisor mode. All restrictions, which are valid for PPC
  3205.         exception handlers added using SetExcHandler, are also valid for
  3206.         the exception handler referenced by tc_ExceptCode.
  3207.  
  3208.     SEE ALSO
  3209.         SetExcHandler
  3210.  
  3211. powerpc.library/SetExcHandler                    powerpc.library/SetExcHandler
  3212.  
  3213.     NAME
  3214.         SetExcHandler - insert a custom exception handler (V9)
  3215.  
  3216.     CPU
  3217.         PowerPC
  3218.  
  3219.     SYNOPSIS
  3220.         XLock = SetExcHandler(_PowerPCBase, ExcTags)
  3221.         r3                    r3            r4
  3222.  
  3223.         void *SetExcHandler(struct Library *, struct TagItem *);
  3224.  
  3225.     FUNCTION
  3226.         This function allows applications to insert custom exception
  3227.         handlers. Those handlers can be global or task dependant,
  3228.         priorities are also supported. Multiple exceptions can be
  3229.         selected for one exception handler.
  3230.  
  3231.         The exception handlers are executed in supervisor mode and
  3232.         have access to all supervisor registers.
  3233.  
  3234.         The handlers are called in one of two possible ways (dependant
  3235.         of the tag EXC_FLAGS):
  3236.  
  3237.         1) EXC_FLAGS has the flag EXCF_SMALLCONTEXT set:
  3238.  
  3239.  
  3240.            Status = CustomHandler(SmallContext)
  3241.            r3                     r3
  3242.  
  3243.            ULONG CustomHandler(struct XCONTEXT*)
  3244.  
  3245.            Inputs:
  3246.                 SmallContext - a pointer to a XCONTEXT structure (see
  3247.                                powerpc/powerpc.i)
  3248.  
  3249.            Result:
  3250.                 Status - a return value which decides, whether the
  3251.                          exception should be leaved immediately or
  3252.                          if following exception handlers should be
  3253.                          executed, too (see powerpc/powerpc.i)
  3254.  
  3255.  
  3256.           In this first method, the handler gets all registers directly,
  3257.           except for r3, which is passed in the XCONTEXT structure. The
  3258.           exception ID, which gives information about the kind of
  3259.           exception occurred, is passed also in XCONTEXT structure.
  3260.  
  3261.           All registers which are modified by the exception handler are
  3262.           also modified for the interrupted task. If r3 should be modified
  3263.           for the interrupted task, the appropriate field of the XCONTEXT
  3264.           structure has to be modified.
  3265.  
  3266.           Some of the interrupted task's registers are passed in special
  3267.           supervisor registers. If they should be changed, the appropriate
  3268.           supervisor registers have to be changed:
  3269.  
  3270.           SPRG1 -       The interrupted task's Link Register
  3271.           SPRG2 -       The interrupted task's Stackpointer (r1)
  3272.           SPRG3 -       The interrupted task's Smalldata Base (r2)
  3273.  
  3274.           The exception stack, which is passed in r1, is allocated from the
  3275.           user stack of the interrupted task.
  3276.  
  3277.  
  3278.         2) EXC_FLAGS has the flag EXCF_LARGECONTEXT set:
  3279.  
  3280.  
  3281.            Status = CustomHandler(LargeContext)
  3282.            r3                     r3
  3283.  
  3284.            ULONG CustomHandler(struct EXCCONTEXT*)
  3285.  
  3286.            Inputs:
  3287.                 LargeContext - a pointer to a EXCCONTEXT structure (see
  3288.                                powerpc/powerpc.i)
  3289.  
  3290.            Result:
  3291.                 Status - a return value which decides, whether the
  3292.                          exception should be leaved immediately or
  3293.                          if following exception handlers should be
  3294.                          executed, too (see powerpc/powerpc.i)
  3295.  
  3296.           In this second method, the handler gets all registers in the
  3297.           EXCCONTEXT structure. If the handler wishes to change some
  3298.           of the register contents it must change the appropriate fields
  3299.           in the EXCCONTEXT structure which are copied back to the
  3300.           registers after the custom handler has completed. If no
  3301.           field is provided for a certain register, it has to be modified
  3302.           directly.
  3303.  
  3304.           The exception stack, which is passed in r1, is allocated from the
  3305.           user stack of the interrupted task.
  3306.  
  3307.     INPUTS
  3308.         _PowerPCBase - base of powerpc.library
  3309.         ExcTags - pointer to a tagitem array. The following tags are
  3310.                   supported:
  3311.  
  3312.             EXCATTR_CODE:       pointer to the exception handler code
  3313.                                 (required)
  3314.             EXCATTR_DATA:       a user data which is passed in r2 to the
  3315.                                 custom exception handler. This is usually
  3316.                                 a base register which provides access to
  3317.                                 all global data required.
  3318.             EXCATTR_TASK:       specifies the task which is allowed to take
  3319.                                 the exception handler. If this tag is 0 or
  3320.                                 omitted, the current task is taken instead.
  3321.                                 This tag has no effect if the exception
  3322.                                 handler is specified as global (see below
  3323.                                 at EXCATTR_FLAGS)
  3324.             EXCATTR_EXCID:      Defines which exceptions should call this
  3325.                                 exception handler. See powerpc/powerpc.i
  3326.                                 for a description of all supported exceptions.
  3327.                                 Multiple exceptions can be selected.
  3328.             EXCATTR_FLAGS:
  3329.                 EXCF_GLOBAL:       Marks the exception handler as global. It
  3330.                                    is then called for every exception occurred.
  3331.                 EXCF_LOCAL:        Marks the exception handler as local. It is
  3332.                                    then only called, if the interrupted task
  3333.                                    matches the task specified in EXCATTR_TASK.
  3334.                 EXCF_SMALLCONTEXT: The exception handler is called with a
  3335.                                    XCONTEXT structure as parameter (see above
  3336.                                    for a description of this mode).
  3337.                 EXCF_LARGECONTEXT: The exception handler is called with a
  3338.                                    EXCCONTEXT structure as parameter (see above
  3339.                                    for a description of this mode).
  3340.  
  3341.                                 One flag of EXCF_GLOBAL and EXCF_LOCAL and one
  3342.                                 flag of EXCF_SMALLCONTEXT and EXCF_LARGECONTEXT
  3343.                                 must be specified, otherwise this function
  3344.                                 fails.
  3345.  
  3346.             EXCATTR_NAME:       An identification name for this handler
  3347.             EXCATTR_PRI:        The priority of this exception handler
  3348.  
  3349.     RESULT
  3350.         XLock - A lock to be passed to RemExcHandler or 0 if something
  3351.                 failed.
  3352.  
  3353.     NOTES
  3354.         Exception handlers should generally take care that they don't
  3355.         destroy any registers of the interrupted task except if it is
  3356.         desired. Special care must be taken if the exception handler is
  3357.         called with the small context structure (take care of r0!). All
  3358.         registers, inclusive CR, CTR, LR and others must be restored if
  3359.         they should not be changed.
  3360.  
  3361.         IMPORTANT: The exception handler is called with MMU switched off!
  3362.         The whole address space is accessed in cachable copyback mode, so
  3363.         no access to critical locations such as custom chip space must
  3364.         be performed. If such locations should be accessed, a temporary
  3365.         MMU setup must be done using the library functions 'SetExcMMU'
  3366.         and 'ClearExcMMU' (V10)
  3367.  
  3368.         Note that changes to the MSR of the interrupted task must be done
  3369.         by writing to SRR1 (i.e. setting the trace bit).
  3370.  
  3371.         Note that exception handlers should generally not call system
  3372.         functions with some exceptions (for example 'SignalPPC' is often
  3373.         useful to call from exception handlers). System functions must not
  3374.         be called unless it's allowed explicitely by the documentation of
  3375.         each function.
  3376.  
  3377.         Note that the content of the program counter (SRR0) differs depending
  3378.         on the exception type. Sometimes it contains the address of the
  3379.         excepting instruction and sometimes the address of the next
  3380.         instruction to complete. Exception handlers must take care about
  3381.         this and should set the program counter appropriately.
  3382.         Here follows a table of all supported exceptions and their behaviour:
  3383.  
  3384.         Machine check (EXCF_MCHECK):        PC -> maybe next instruction
  3385.         Data access (EXCF_DACCESS):         PC -> excepting instruction
  3386.         Instruction access (EXCF_IACCESS):  PC -> next instruction
  3387.         Alignment (EXCF_ALIGN):             PC -> excepting instruction
  3388.         Program (EXCF_PROGRAM):             PC -> excepting instruction
  3389.         FP unavailable (EXCF_FPUN):         PC -> excepting instruction
  3390.         Trace (EXCF_TRACE):                 PC -> next instruction
  3391.         Performance Monitor (EXCF_PERFMON): unknown
  3392.         Instruction breakpoint (EXCF_IABR): PC -> excepting instruction
  3393.  
  3394.         New for V15:
  3395.         External interrupt (EXCF_INTERRUPT):PC -> next instruction
  3396.  
  3397.         Exception handlers for the external interrupt are only called
  3398.         for interrupts invoked by powerpc/CauseInterrupt or
  3399.         powerpc/CausePPCInterrupt.
  3400.  
  3401.         Exception handlers should not waste stack space. The system
  3402.         allocates an extra space for this purpose but it may not be
  3403.         sufficient if very stack-intensive routines are called as
  3404.         exception handlers.
  3405.  
  3406.         If every exception handler returns the state EXCRETURN_NORMAL
  3407.         then the standard WarpOS exception handler is executed (except
  3408.         for Trace- and PerformanceMonitor-Exceptions).
  3409.  
  3410.         If exception handlers are written to emulate commands causing
  3411.         an exception they should return EXCRETURN_ABORT as return value
  3412.         to suppress following exception handlers which might output
  3413.         some alert messages. The priority should be probably high enough
  3414.         to ensure that no unwanted reactions occur.
  3415.  
  3416.         The WarpOS debugging system is disabled during exception
  3417.         processing.
  3418.  
  3419.         It's completely ILLEGAL to exit an exception handler by an RFI
  3420.         instruction!! It's also illegal to trash SPRG0!
  3421.  
  3422.     SEE ALSO
  3423.         RemExcHandler, powerpc/powerpc.i
  3424.  
  3425. powerpc.library/SetExcMMU                            powerpc.library/SetExcMMU
  3426.  
  3427.     NAME
  3428.         SetExcMMU - installs a BAT based MMU setup for exception handlers (V10)
  3429.  
  3430.     CPU
  3431.         PowerPC
  3432.  
  3433.     SYNOPSIS
  3434.         SetExcMMU(_PowerPCBase)
  3435.                   r3
  3436.  
  3437.         void SetExcMMU(struct Library *);
  3438.  
  3439.     FUNCTION
  3440.         This function is for exception handlers only. It installs a new
  3441.         temporary MMU setup which allows exception handlers to access critical
  3442.         address space, such as custom chip space. Exception handlers are
  3443.         normally run with MMU switched off to avoid problems on systems
  3444.         without hardware tablesearch.
  3445.  
  3446.         The new MMU setup is based on the BAT registers.
  3447.  
  3448.         The function 'ClearExcMMU' restores the old MMU state and should
  3449.         be called at the end of the exception handler.
  3450.  
  3451.  
  3452.     INPUTS
  3453.         _PowerPCBase - base of powerpc.library
  3454.  
  3455.     NOTES
  3456.         This function must not be called from anywhere else than from
  3457.         an exception handler.
  3458.  
  3459.     SEE ALSO
  3460.         ClearExcMMU
  3461.  
  3462. powerpc.library/SetHardware                        powerpc.library/SetHardware
  3463.  
  3464.     NAME
  3465.         SetHardware - hardware manipulation function (V9)
  3466.  
  3467.     CPU
  3468.         PowerPC
  3469.  
  3470.     SYNOPSIS
  3471.         Status = SetHardware(_PowerPCBase, hardwareflags, parameter)
  3472.                              r3            r4             r5
  3473.  
  3474.         ULONG SetHardware(struct Library *, ULONG, void *);
  3475.  
  3476.     FUNCTION
  3477.         This function offers some functions to access the PPC hardware.
  3478.  
  3479.     INPUTS
  3480.         _PowerPCBase - base of powerpc.library
  3481.         hardwareflags - action to be performed:
  3482.             HW_TRACEON:         Enables trace mode for the current task
  3483.             HW_TRACEOFF:        Disables trace mode for the current task
  3484.             HW_BRANCHTRACEON:   Enables branch trace mode for the current task
  3485.             HW_BRANCHTRACEOFF:  Disables branch trace mode for the current task
  3486.             HW_FPEXCON:         Enables the floating point exceptions for the
  3487.                                 current task
  3488.             HW_FPEXCOFF:        Disables the floating point exceptions for the
  3489.                                 current task
  3490.             HW_SETIBREAK:       Sets the global instruction breakpoint
  3491.             HW_CLEARIBREAK:     Clears the global instruction breakpoint
  3492.             HW_SETDBREAK:       Sets the global data breakpoint
  3493.             HW_CLEARDBREAK:     Clears the global data breakpoint
  3494.  
  3495.         parameter - additional parameter only used if a breakpoint should be
  3496.                     set. Then it contains the breakpoint address.
  3497.  
  3498.     RESULT
  3499.         Status - HW_AVAILABLE: The requested feature is available on this CPU
  3500.                  HW_NOTAVAILABLE: The requested feature is not available on
  3501.                                   this CPU
  3502.  
  3503.     NOTES
  3504.         Floating point exceptions are only enabled globally with HW_FPEXCON.
  3505.         It's necessary to call 'ModifyFPExc' to enable the desired floating
  3506.         point exceptions.
  3507.  
  3508.         Floating point exceptions should not be enabled by standard
  3509.         applications. They are intended to use for debugging purposes.
  3510.  
  3511.         The data breakpoint feature is not available on PPC603[E].
  3512.  
  3513.     SEE ALSO
  3514.         ModifyFPExc, powerpc/powerpc.i
  3515.  
  3516. powerpc.library/SetNiceValue                      powerpc.library/SetNiceValue
  3517.  
  3518.     NAME
  3519.         SetNiceValue - sets the NICE value of a task (V14)
  3520.  
  3521.     CPU
  3522.         PowerPC
  3523.  
  3524.     SYNOPSIS
  3525.         OldNice = SetNiceValue(_PowerPCBase, TaskPPC, Nice)
  3526.         r3                     r3            r4       r5
  3527.  
  3528.         LONG* SetNiceValue(struct Library *, struct TaskPPC *, LONG);
  3529.  
  3530.     FUNCTION
  3531.         This function can be used to set the NICE value of a task. The
  3532.         NICE value is a kind of priority, which replaces the old priority
  3533.         in LN_PRI. NICE values were introduced with the dynamic scheduler
  3534.         which works very differently than the old scheduler.
  3535.  
  3536.         If a task gets a high NICE value, it means that the task is nice
  3537.         to other tasks and won't request much CPU time. If a task gets
  3538.         a low NICE value, the opposite occurs. Using NICE values it is
  3539.         possible to affect execution speed of tasks.
  3540.  
  3541.     INPUTS
  3542.         _PowerPCBase - base of powerpc.library
  3543.         TaskPPC - pointer to the task which should be affected
  3544.         Nice - the NICE value (-20 ... 20)
  3545.  
  3546.     RESULT
  3547.         The old NICE value
  3548.  
  3549.     SEE ALSO
  3550.         SetTaskPriPPC, powerpc/tasksPPC.i, powerpc/tasksPPC.h
  3551.  
  3552. powerpc.library/SetReplyPortPPC                powerpc.library/SetReplyPortPPC
  3553.  
  3554.     NAME
  3555.         SetReplyPortPPC - exchanges the reply port of a message (V13)
  3556.  
  3557.     CPU
  3558.         PowerPC
  3559.  
  3560.     SYNOPSIS
  3561.         OldPort = SetReplyPortPPC(_PowerPCBase, Message, MsgPortPPC)
  3562.         r3                        r3            r4       r5
  3563.  
  3564.         struct MsgPortPPC* SetReplyPortPPC(struct Library *,
  3565.                            struct Message *, struct MsgPortPPC *);
  3566.  
  3567.     FUNCTION
  3568.         This function exchanges the message port of a message. It
  3569.         can be used for internal PPC messages and for InterCPU
  3570.         messages.
  3571.  
  3572.     INPUTS
  3573.         _PowerPCBase - base of powerpc.library
  3574.         Message - a pointer to the message affected
  3575.         MsgPortPPC - a pointer to a PPC message port
  3576.  
  3577.     RESULT
  3578.         The old reply port, which was installed in the message.
  3579.         Can be NULL, of course.
  3580.  
  3581.     NOTES
  3582.         It's possible to specify NULL as MsgPort to remove the
  3583.         reply port.
  3584.  
  3585.         Don't poke into the message structure at MN_REPLYPORT,
  3586.         please use this function here.
  3587.  
  3588.     SEE ALSO
  3589.         WaitPortPPC, GetMsgPPC, ReplyMsgPPC, PutMsgPPC, powerpc/portsPPC.i
  3590.  
  3591. powerpc.library/SetScheduling                    powerpc.library/SetScheduling
  3592.  
  3593.     NAME
  3594.         SetScheduling - affects scheduling behaviour (V14)
  3595.  
  3596.     CPU
  3597.         PowerPC
  3598.  
  3599.     SYNOPSIS
  3600.         SetScheduling(_PowerPCBase, SchedTagList)
  3601.                       r3            r4
  3602.  
  3603.         void SetScheduling(struct Library *, struct TagItem *);
  3604.  
  3605.     FUNCTION
  3606.         This function is used to set some scheduling parameters.
  3607.  
  3608.     INPUTS
  3609.         _PowerPCBase - base of powerpc.library
  3610.         SchedTagList - pointer to a tagitem array. The following tags are
  3611.                        supported:
  3612.             SCHED_REACTION:     Sets the reaction time of low-activity tasks.
  3613.                                 This value can be in range of (1..20). The
  3614.                                 higher the value the more CPU time a
  3615.                                 low-activity task gets (but which causes
  3616.                                 longer blocking of busy tasks). Default is
  3617.                                 currently 6.
  3618.  
  3619.     NOTES
  3620.         This function is safe to call from exception handlers.
  3621.  
  3622.     SEE ALSO
  3623.         powerpc/powerpc.i
  3624.  
  3625. powerpc.library/SetSignalPPC                      powerpc.library/SetSignalPPC
  3626.  
  3627.     NAME
  3628.         SetSignalPPC - define the state of this task's signals (V8)
  3629.  
  3630.     CPU
  3631.         PowerPC
  3632.  
  3633.     SYNOPSIS
  3634.         oldSignals = SetSignalPPC(_PowerPCBase, newSignals, signalMask)
  3635.         r3                        r3            r4          r5
  3636.  
  3637.         ULONG SetSignalPPC(struct Library *, ULONG, ULONG);
  3638.  
  3639.     FUNCTION
  3640.         This function can query or modify the state of the current
  3641.         signals. This function is the mirror function of exec/SetSignal.
  3642.  
  3643.     INPUTS
  3644.         _PowerPCBase - base of powerpc.library
  3645.         newSignals - the new values for the signals
  3646.         signalMask - the set of signals to be affected.
  3647.  
  3648.     RESULT
  3649.         oldSignals - the prior values for all signals
  3650.  
  3651.     NOTES
  3652.         It's possible to check for the system signals (i.e. CTRL_C).
  3653.  
  3654.         Before V11, this only worked if the task was stated using
  3655.         RunPPC, this is not the case anymore.
  3656.  
  3657.     SEE ALSO
  3658.         AllocSignalPPC, FreeSignalPPC, SignalPPC, WaitPPC
  3659.  
  3660. powerpc.library/SetTaskPriPPC                    powerpc.library/SetTaskPriPPC
  3661.  
  3662.     NAME
  3663.         SetTaskPriPPC - get and set the priority of a task (V8)
  3664.  
  3665.     CPU
  3666.         PowerPC
  3667.  
  3668.     SYNOPSIS
  3669.         oldpriority = SetTaskPriPPC(_PowerPCBase, taskPPC, priority)
  3670.         r3                          r3            r4       r5
  3671.  
  3672.         LONG SetTaskPriPPC(struct Library *, struct TaskPPC *, LONG);
  3673.  
  3674.     FUNCTION
  3675.         This function changes the priority of a task regardless of its
  3676.         state. The old priority of the task is returned. A reschedule
  3677.         may be performed. This is the mirror function of exec/SetTaskPri.
  3678.  
  3679.         Important: These task priorities are completely useless from V14
  3680.         on because of the new dynamic scheduler which uses NICE values
  3681.         instead of fixed priorities. Use 'SetNiceValue' to give tasks
  3682.         more or less CPU time.
  3683.  
  3684.     INPUTS
  3685.         _PowerPCBase - base of powerpc.library
  3686.         taskPPC - task to be affected
  3687.         priority - the new priority for the task
  3688.  
  3689.     RESULT
  3690.         old priority - the tasks previous priority
  3691.  
  3692.     SEE ALSO
  3693.         SetNiceValue
  3694.  
  3695. powerpc.library/Signal68K                            powerpc.library/Signal68K
  3696.  
  3697.     NAME
  3698.         SignalPPC - signal a 68K task (V8)
  3699.  
  3700.     CPU
  3701.         PowerPC
  3702.  
  3703.     SYNOPSIS
  3704.         Signal68K(_PowerPCBase, task, signals)
  3705.                   r3            r4       r5
  3706.  
  3707.         void Signal68K(struct Library *, struct Task*, ULONG);
  3708.  
  3709.     FUNCTION
  3710.         This function signals a 68K task with the given signals. If
  3711.         the signalled task is sleeping, it's woken up and a reschedule
  3712.         may occur.
  3713.  
  3714.     INPUTS
  3715.         _PowerPCBase - base of powerpc.library
  3716.         task - the 68K task to be signalled
  3717.         signals - the signals to be sent
  3718.  
  3719. powerpc.library/SignalPPC                            powerpc.library/SignalPPC
  3720.  
  3721.     NAME
  3722.         SignalPPC - signal a task (V8)
  3723.  
  3724.     CPU
  3725.         PowerPC
  3726.  
  3727.     SYNOPSIS
  3728.         SignalPPC(_PowerPCBase, taskPPC, signals)
  3729.                   r3            r4       r5
  3730.  
  3731.         void SignalPPC(struct Library *, struct TaskPPC*, ULONG);
  3732.  
  3733.     FUNCTION
  3734.         This function signals a task with the given signals. If the
  3735.         signalled task is sleeping, it's woken up and a reschedule
  3736.         may occur. This is the mirror function of exec/Signal.
  3737.  
  3738.     INPUTS
  3739.         _PowerPCBase - base of powerpc.library
  3740.         taskPPC - the task to be signalled
  3741.         signals - the signals to be sent
  3742.  
  3743.     NOTES
  3744.         This function is safe to call from exception handlers.
  3745.  
  3746.         Since V11 it's possible to signal a 68K task directly
  3747.         with 'SignalPPC' and the 68K task structure in r4.
  3748.  
  3749.         Before V11, 'SignalPPC' only worked, if the PPC task
  3750.         had a mirror 68K task. Since V11, every PPC task has
  3751.         a mirror task, so 'SignalPPC' can always be used.
  3752.  
  3753.         Furthermore, all signals, which are sent to a task currently
  3754.         waiting for its mirror task to complete, are transferred
  3755.         automatically to the mirror task. In fact, the whole signal
  3756.         system is shared and can be viewed as one single 'virtual
  3757.         signaling system'. It really doesn't matter, on which CPU
  3758.         a program is running, the signals are always transferred to
  3759.         the currently active part.
  3760.  
  3761.         Important note: if signals are allocated/freed on one CPU,
  3762.         then the other one doesn't know about this until the next
  3763.         context switch. Therefore sending signals from i.e. the
  3764.         68K to the PPC, which has allocated a new signal recently
  3765.         using AllocSignalPPC without doing a context switch,
  3766.         doesn't work.
  3767.  
  3768.     SEE ALSO
  3769.         AllocSignalPPC, FreeSignalPPC, SetSignalPPC, WaitPPC
  3770.  
  3771. powerpc.library/SnoopTask                            powerpc.library/SnoopTask
  3772.  
  3773.     NAME
  3774.         SnoopTask - monitors beginning or end of a PPC task (V13)
  3775.  
  3776.     CPU
  3777.         PowerPC
  3778.  
  3779.     SYNOPSIS
  3780.         SnoopID = SnoopTask (_PowerPCBase, SnoopTags)
  3781.         r3                   r3            r4
  3782.  
  3783.         ULONG SnoopTask (struct Library *, struct TagItem *);
  3784.  
  3785.     FUNCTION
  3786.         This function allows to intall a callback job, which is executed
  3787.         when a new PPC task is started or when a PPC task is removed.
  3788.         This is useful for debuggers which want to be kept informed
  3789.         about new tasks installed into the system and about tasks removed
  3790.         from the system.
  3791.  
  3792.         The callback function has two different formats (prototypes),
  3793.         dependant on the type of callback:
  3794.  
  3795.         1. callback function for monitoring the beginning of a PPC task
  3796.            (SNOOP_TYPE = SNOOP_START)
  3797.  
  3798.            SYNOPSIS:
  3799.  
  3800.            CallbackFunction (PPCTask, EntryCode, CreatorTask, CreatorCPU)
  3801.                              r3       r4         r5           r6
  3802.  
  3803.            void CallbackFunction (struct TaskPPC *, APTR, struct Task *, ULONG);
  3804.  
  3805.            INPUTS:
  3806.            PPCTask - pointer to the new PPC task which is created
  3807.            EntryCode - pointer to the start code, which will be executed
  3808.                        by the new task
  3809.            CreatorTask - pointer to the task structure of the task, which
  3810.                          created the new PPC task. If the new task is created
  3811.                          due to a call of RunPPC from 68K side, then the
  3812.                          CreatorTask points to the 68K-Task-Structure. If
  3813.                          the PPC task was created by directly calling
  3814.                          'CreateTaskPPC', CreatorTask points to this PPC task.
  3815.            CreatorCPU - One of two possible values:
  3816.                         CREATOR_PPC : The new PPC task was created using
  3817.                                       'CreateTaskPPC' by a PPC task.
  3818.                         CREATOR_68K : The new PPC task was created using
  3819.                                       'RunPPC' by a 68K task.
  3820.  
  3821.  
  3822.         2. callback function for monitoring the end of a PPC task
  3823.            (SNOOP_TYPE = SNOOP_EXIT)
  3824.  
  3825.            SYNOPSIS:
  3826.  
  3827.            CallbackFunction (PPCTask)
  3828.                              r3
  3829.  
  3830.            void CallbackFunction (struct TaskPPC *);
  3831.  
  3832.            INPUTS:
  3833.            PPCTask - pointer to the PPC task which is removed. NEVER use
  3834.                      FindTaskPPC(NULL), because it's possible that a PPC
  3835.                      task is removed by another PPC task!
  3836.  
  3837.     INPUTS
  3838.         _PowerPCBase - base of powerpc.library
  3839.         TagItems - pointer to a tagitem array. The following tags are
  3840.                    supported:
  3841.  
  3842.             SNOOP_CODE:         pointer to the callback function which should
  3843.                                 be called, if a new PPC task is created or
  3844.                                 if a PPC task is removed.
  3845.             SNOOP_DATA:         custom data which passed in register r2.
  3846.                                 this will usually be the smalldata base of
  3847.                                 the task which wants to snoop other tasks
  3848.                                 to gain access to more data space.
  3849.             SNOOP_TYPE:         two possible values:
  3850.                                 SNOOP_START : The callback function is called
  3851.                                               when a new PPC task is created
  3852.                                 SNOOP_EXIT  : The callback function is called
  3853.                                               when a PPC task is removed
  3854.     RESULT
  3855.         SnoopID - An ID, which must be passed to EndSnoopTask, as soon as the
  3856.                   snooping action should be terminated. NULL, if an error
  3857.                   occurs.
  3858.  
  3859.     SEE ALSO
  3860.         EndSnoopTask
  3861.  
  3862. powerpc.library/SPrintF                                powerpc.library/SPrintF
  3863.  
  3864.     NAME
  3865.         SPrintF - prints a formatted string to the serial port (V7)
  3866.  
  3867.     CPU
  3868.         PowerPC
  3869.  
  3870.     SYNOPSIS
  3871.         SPrintF (_PowerPCBase, Formatstring, values )
  3872.                  r3             r4             r5
  3873.  
  3874.         void SPrintF (struct Library *, STRPTR, APTR);
  3875.  
  3876.     FUNCTION
  3877.         Prints a formatted string to the serial port using the AMIGA-OS
  3878.         functions 'exec/RawPutChar' and 'exec/RawDoFmt'. Can be used to add
  3879.         debugging features and to improve the maintenance of software.
  3880.  
  3881.     INPUTS
  3882.         _PowerPCBase - base of powerpc.library
  3883.         Formatstring - A C style string with % commands to indicate where
  3884.                        parameters have to be inserted (see 'exec/RawDoFmt'
  3885.                        for a detailed description of these commands).
  3886.         values - A pointer to an array of parameters to be inserted into
  3887.                  specified places in the string.
  3888.  
  3889.     SEE ALSO
  3890.         exec/RawDoFmt
  3891.  
  3892. powerpc.library/SubTimePPC                          powerpc.library/SubTimePPC
  3893.  
  3894.     NAME
  3895.         SubTimePPC - subtracts one time request from another (V7)
  3896.  
  3897.     CPU
  3898.         PowerPC
  3899.  
  3900.     SYNOPSIS
  3901.         SubTimePPC(_PowerPCBase, Dest, Source)
  3902.                    r3            r4    r5
  3903.  
  3904.         void SubTimePPC(struct Library *, struct timeval *, struct timeval *);
  3905.  
  3906.     FUNCTION
  3907.         This routine subtracts one timeval structure from another. The results
  3908.         are stored in the destination (Dest - Source -> Dest)
  3909.  
  3910.         This is the mirror function of timer/SubTime.
  3911.  
  3912.     INPUTS
  3913.         _PowerPCBase - base of powerpc.library
  3914.         Dest - pointer to a timeval structure
  3915.         Source - pointer to a timeval structure
  3916.  
  3917.     NOTES
  3918.         This function is safe to call from exception handlers
  3919.  
  3920.     SEE ALSO
  3921.         GetSysTimePPC, AddTimePPC, CmpTimePPC
  3922.  
  3923. powerpc.library/Super                                    powerpc.library/Super
  3924.  
  3925.     NAME
  3926.         Super - switch to supervisor mode (V9)
  3927.  
  3928.     CPU
  3929.         PowerPC
  3930.  
  3931.     SYNOPSIS
  3932.         SuperKey = Super(_PowerPCBase)
  3933.         r3               r3
  3934.  
  3935.         ULONG Super(struct Library *);
  3936.  
  3937.     FUNCTION
  3938.         This function changes the current task to supervisor mode.
  3939.  
  3940.     INPUTS
  3941.         _PowerPCBase - base of powerpc.library
  3942.  
  3943.     RESULT
  3944.         SuperKey - A key value which must be passed to 'User' to switch back
  3945.                    to user mode
  3946.  
  3947.     NOTES
  3948.         Applications should generally not enter supervisor mode. Check first
  3949.         if there exists a library function which gives you access to the
  3950.         supervisor resources required.
  3951.  
  3952.     SEE ALSO
  3953.         User
  3954.  
  3955. powerpc.library/TrySemaphorePPC                powerpc.library/TrySemaphorePPC
  3956.  
  3957.     NAME
  3958.         TrySemaphorePPC - gain exclusive access to a semaphore with timeout (V15)
  3959.  
  3960.     CPU
  3961.         PowerPC
  3962.  
  3963.     SYNOPSIS
  3964.         status = TrySemaphorePPC(_PowerPCBase, SignalSemaphorePPC, Timeout)
  3965.                                  r3            r4                  r5
  3966.  
  3967.         LONG TrySemaphorePPC(struct Library *,
  3968.                                 struct SignalSemaphorePPC *, ULONG);
  3969.  
  3970.     FUNCTION
  3971.         Tries to get exclusive access to a signal semaphore. If the semaphore
  3972.         is occupied, the task adds itself into a waiting queue. The task
  3973.         only waits for the amount of time given with the 'Timeout' parameter.
  3974.         If the semaphore couldn't be obtained during this time, the
  3975.         function returns.
  3976.  
  3977.     INPUTS
  3978.         _PowerPCBase - base of powerpc.library
  3979.         SignalSemaphorePPC - pointer to a signalsemaphorePPC structure
  3980.         Timeout - timeout value in microseconds
  3981.  
  3982.     RESULT
  3983.         status - status value:
  3984.             ATTEMPT_SUCCESS: operation successful
  3985.             ATTEMPT_FAILURE: semaphore couldn't be locked
  3986.  
  3987.     NOTES
  3988.         This call is guaranteed to preserve all GPR (except r0/r3)
  3989.         and the CTR.
  3990.  
  3991.     SEE ALSO
  3992.         InitSemaphorePPC, FreeSemaphorePPC, AttemptSemaphorePPC,
  3993.         ReleaseSemaphorePPC, AddSemaphorePPC, RemSemaphorePPC
  3994.         FindSemaphorePPC, ObtainSemaphorePPC, powerpc/semaphoresPPC.i
  3995.  
  3996. powerpc.library/UnLockTaskList                  powerpc.library/UnLockTaskList
  3997.  
  3998.     NAME
  3999.         UnLockTaskList - unlocks a list locked by LockTaskList (V10)
  4000.  
  4001.     CPU
  4002.         PowerPC
  4003.  
  4004.     SYNOPSIS
  4005.         UnLockTaskList(_PowerPCBase)
  4006.                        r3
  4007.  
  4008.         void UnLockTaskList(struct Library *);
  4009.  
  4010.     FUNCTION
  4011.         Unlocks the task list which was locked by LockTaskList
  4012.  
  4013.     INPUTS
  4014.         _PowerPCBase - base of powerpc.library
  4015.  
  4016.     SEE ALSO
  4017.         LockTaskList, powerpc/tasksppc.i
  4018.  
  4019. powerpc.library/User                                      powerpc.library/User
  4020.  
  4021.     NAME
  4022.         User - switch to user mode (V9)
  4023.  
  4024.     CPU
  4025.         PowerPC
  4026.  
  4027.     SYNOPSIS
  4028.         User(_PowerPCBase, SuperKey)
  4029.              r3            r4
  4030.  
  4031.         void User(struct Library *, ULONG);
  4032.  
  4033.     FUNCTION
  4034.         This function changes the current task to user mode.
  4035.  
  4036.     INPUTS
  4037.         _PowerPCBase - base of powerpc.library
  4038.         SuperKey - The return value of the matching call of 'Super'
  4039.  
  4040.     SEE ALSO
  4041.         Super
  4042.  
  4043. powerpc.library/VacatePPC                            powerpc.library/VacatePPC
  4044.  
  4045.     NAME
  4046.         VacatePPC - release a Semaphore obtained by ProcurePPC (V15)
  4047.  
  4048.     CPU
  4049.         PowerPC
  4050.  
  4051.     SYNOPSIS
  4052.         VacatePPC(_PowerPCBase, SignalSemaphorePPC, SemaphoreMessage)
  4053.                    r3            r4                  r5
  4054.  
  4055.         void VacatePPC(struct Library *,
  4056.                         struct SignalSemaphorePPC *, struct SemaphoreMessage *);
  4057.  
  4058.     FUNCTION
  4059.         This function is used to release semaphores obtained by ProcurePPC.
  4060.         Additionally a ProcurePPC request, which was not responded yet,
  4061.         can be cancelled this way. This is the mirror function of
  4062.         exec/Vacate. See the documentation of exec/Vacate for more
  4063.         infos.
  4064.  
  4065.         Note, that VacatePPC is implemented according to exec V39/V40
  4066.         behaviour of Vacate.
  4067.  
  4068.     INPUTS
  4069.         _PowerPCBase - base of powerpc.library
  4070.         SignalSemaphorePPC - pointer to a signalsemaphorePPC structure
  4071.         bidMessage- SemaphoreMessage that you wish to abort.
  4072.                 The message's ssm_Semaphore field will be cleared.
  4073.                 The message will be replied if it is still on the waiting
  4074.                 list.  If it is not on the waiting list, it is assumed
  4075.                 that the semaphore is owned and it will be released.
  4076.  
  4077.     SEE ALSO
  4078.         ProcurePPC, powerpc/semaphoresPPC.i
  4079.  
  4080. powerpc.library/WaitFor68K                          powerpc.library/WaitFor68K
  4081.  
  4082.     NAME
  4083.         WaitFor68K - waits for the completion of an asynchrone 68K call (V7)
  4084.  
  4085.     CPU
  4086.         PowerPC
  4087.  
  4088.     SYNOPSIS
  4089.         status = WaitFor68K(_PowerPCBase, PPStruct )
  4090.         r3                  r3             r4
  4091.  
  4092.         LONG WaitFor68K (struct Library *, struct PowerPC *);
  4093.  
  4094.     FUNCTION
  4095.         After an asynchrone 68K call was done (see Run68K) this function must
  4096.         be called to wait for the completion of the 68K function. All
  4097.         registers transferred to the PowerPC with Run68K are returned into the
  4098.         PowerPC Structure.
  4099.  
  4100.     INPUTS
  4101.         _PowerPCBase - base of powerpc.library
  4102.         PPStruct - Pointer to a PowerPC Structure (see Run68K for a description
  4103.                    of the elements). The structure has not to be initialized.
  4104.                    The structure must be transferred to hold the returned
  4105.                    registers by the 68K function.
  4106.  
  4107.     RESULT
  4108.         status - PPERR_SUCCESS if the call was successfully
  4109.                  PPERR_WAITERR if WaitFor68K is called after a synchrone 68K
  4110.                                call.
  4111.  
  4112.     NOTES
  4113.         Assembler programmers should use the macros WAITFOR68K and
  4114.         WAITFOR68K_XL located in the include file 'powerpc/powerpc.i'
  4115.  
  4116.     SEE ALSO
  4117.         Run68K,powerpc/powerpc.i
  4118.  
  4119. powerpc.library/WaitPortPPC                        powerpc.library/WaitPortPPC
  4120.  
  4121.     NAME
  4122.         WaitPortPPC - wait for a given port to be non-empty (V11)
  4123.  
  4124.     CPU
  4125.         PowerPC
  4126.  
  4127.     SYNOPSIS
  4128.         message = WaitPortPPC(_PowerPCBase, MsgPortPPC)
  4129.         r3                    r3            r4
  4130.  
  4131.         struct Message *WaitPortPPC(struct Library *, struct MsgPortPPC *);
  4132.  
  4133.     FUNCTION
  4134.         This function waits until the given port becomes non-empty. The
  4135.         first message in the port is returned without removing it from
  4136.         the port. This is the mirror function of exec/WaitPort.
  4137.  
  4138.     INPUTS
  4139.         _PowerPCBase - base of powerpc.library
  4140.         port - a pointer to a message port
  4141.  
  4142.     RESULTS
  4143.         message - a pointer to the first available message
  4144.  
  4145.     SEE ALSO
  4146.         PutMsgPPC, GetMsgPPC, ReplyMsgPPC, powerpc/portsPPC.i
  4147.  
  4148. powerpc.library/WaitPPC                                powerpc.library/WaitPPC
  4149.  
  4150.     NAME
  4151.         WaitPPC - wait for one or more signals (V8)
  4152.  
  4153.     CPU
  4154.         PowerPC
  4155.  
  4156.     SYNOPSIS
  4157.         signals = WaitPPC(_PowerPCBase, signalSet)
  4158.         r3                r3            r4
  4159.  
  4160.         ULONG WaitPPC(struct Library *, ULONG);
  4161.  
  4162.     FUNCTION
  4163.         This function attempts to wait for the given signals. If at
  4164.         least one of these signal is already set, the task returns
  4165.         immediately, otherwise it changes to waiting state. This is
  4166.         the mirror function of exec/Wait.
  4167.  
  4168.     INPUTS
  4169.         _PowerPCBase - base of powerpc.library
  4170.         signalSet - the set of signals for which to wait
  4171.  
  4172.     RESULTS
  4173.         signals - the signals which were received
  4174.  
  4175.     NOTES
  4176.         Since V11 it's possible to wait for signals which might
  4177.         be sent by 68K tasks (and maybe only to the mirror 68K
  4178.         task of this PPC task here). Calling exec/Signal with a
  4179.         PPC task structure as first argument will work, too.
  4180.         See the desription of 'SignalPPC' for more information
  4181.         about the shared signaling system.
  4182.  
  4183.     SEE ALSO
  4184.         AllocSignalPPC, FreeSignalPPC, SetSignalPPC, SignalPPC
  4185.  
  4186. powerpc.library/WaitTime                              powerpc.library/WaitTime
  4187.  
  4188.     NAME
  4189.         WaitTime - wait for a given time or for given signals (V10)
  4190.  
  4191.     CPU
  4192.         PowerPC
  4193.  
  4194.     SYNOPSIS
  4195.         signals = WaitTime(_PowerPCBase, signalSet, time)
  4196.         r3                 r3            r4         r5
  4197.  
  4198.         ULONG WaitTime(struct Library *, ULONG, ULONG);
  4199.  
  4200.     FUNCTION
  4201.         This function attempts to wait for a specific time of for
  4202.         given signals. This function acts just like 'WaitPPC' with
  4203.         the difference that the task returns when the time specified
  4204.         is over.
  4205.  
  4206.     INPUTS
  4207.         _PowerPCBase - base of powerpc.library
  4208.         signalSet - the set of signals for which to wait (can be 0
  4209.                     if the task should only wait for a given time)
  4210.         time - the time in microseconds to wait
  4211.  
  4212.     RESULTS
  4213.         signals - the signals which were received (if this value is 0,
  4214.                   then the time is up).
  4215.  
  4216.     NOTES
  4217.         The time which explicitly passes between calling 'WaitTime' and
  4218.         returning from it can vary dependant of current system state. If
  4219.         many tasks are active, the time can be delayed. Furthermore the
  4220.         overhead of this function must be taken in account.
  4221.  
  4222.     SEE ALSO
  4223.         WaitPPC
  4224.  
  4225.  
  4226.