home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 15 / AACD15.ISO / AACD / System / MorphOS / Developer / include / public / quark / task.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-11-02  |  16.2 KB  |  626 lines

  1. #ifndef    QUARK_TASK_H
  2. #define    QUARK_TASK_H
  3.  
  4. #include <public/quark/types.h>
  5.  
  6. /*
  7.  * Corrected by the sed makefile subroutine
  8.  */
  9. typedef unsigned long long    q_pid_t;
  10. typedef unsigned long long    q_tid_t;
  11. typedef unsigned long        q_signalmask_t;
  12.  
  13. #define    THREADCOUNT    128
  14.  
  15. #define THREADTAG_DUMMY        (0x1000)
  16.  
  17.  
  18. /* Sequence: THREADTAG_CHIEFTID, q_tid_t*
  19.  * Function: Create
  20.  *           TID of the Clan Chief of the new task.
  21.  *           This tag is only useful for CreateTask.
  22.  *           If it`s not specified the parent`s ChiefTID
  23.  *           is used.
  24.  *           You`ve automaticly added to the VillageList of
  25.  *           your ChiefThread`s VillageList.
  26.  *           ChiefThread`s are used when you send message to
  27.  *           a msgport which isn`t part of your CLAN.
  28.  *           Nice for security gateway..or gateways to other
  29.  *           computers.
  30.  */
  31. #define    THREADTAG_CHIEFTID    (THREADTAG_DUMMY + 0x1)
  32.  
  33. /* Sequence: THREADTAG_NAME, char*
  34.  * Function: Create
  35.  *           Name of the new Task.
  36.  */
  37. #define    THREADTAG_NAME        (THREADTAG_DUMMY + 0x2)
  38.  
  39. /* Sequence: THREADTAG_ARG1, u_int32_t
  40.  * Function: Create
  41.  *           1st Argument..gpr3
  42.  */
  43. #define    THREADTAG_ARG1        (THREADTAG_DUMMY + 0x3)
  44.  
  45. /* Sequence: THREADTAG_ARG2, u_int32_t
  46.  * Function: Create
  47.  *           2nd Argument..gpr4
  48.  */
  49. #define    THREADTAG_ARG2        (THREADTAG_DUMMY + 0x4)
  50.  
  51. /* Sequence: THREADTAG_ARG3, u_int32_t
  52.  * Function: Create
  53.  *           3rd Argument..gpr5
  54.  */
  55. #define    THREADTAG_ARG3        (THREADTAG_DUMMY + 0x5)
  56.  
  57. /* Sequence: THREADTAG_ARG4, u_int32_t
  58.  * Function: Create
  59.  *           4th Argument..gpr6
  60.  */
  61. #define    THREADTAG_ARG4        (THREADTAG_DUMMY + 0x6)
  62.  
  63. /* Sequence: THREADTAG_ARG5, u_int32_t
  64.  * Function: Create
  65.  *           5th Argument..gpr7
  66.  */
  67. #define    THREADTAG_ARG5        (THREADTAG_DUMMY + 0x7)
  68.  
  69. /* Sequence: THREADTAG_ARG6, u_int32_t
  70.  * Function: Create
  71.  *           6th Argument..gpr8
  72.  */
  73. #define    THREADTAG_ARG6        (THREADTAG_DUMMY + 0x8)
  74.  
  75. /* Sequence: THREADTAG_ARG7, u_int32_t
  76.  * Function: Create
  77.  *           7th Argument..gpr9
  78.  */
  79. #define    THREADTAG_ARG7        (THREADTAG_DUMMY + 0x9)
  80.  
  81. /* Sequence: THREADTAG_ARG8, u_int32_t
  82.  * Function: Create
  83.  *           8th Argument..gpr10
  84.  */
  85. #define    THREADTAG_ARG8        (THREADTAG_DUMMY + 0xa)
  86.  
  87. /* Sequence: THREADTAG_CLASS, u_int32_t
  88.  * Function: Create
  89.  *           define Scheduler Class
  90.  */
  91. #define    THREADTAG_CLASS        (THREADTAG_DUMMY + 0xb)
  92.  
  93. /* Sequence: THREADTAG_CLASSPRI, int32_t
  94.  * Function: Create
  95.  *           define Scheduler Class Priority
  96.  */
  97. #define    THREADTAG_CLASSPRI    (THREADTAG_DUMMY + 0xc)
  98.  
  99. /* Sequence: THREADTAG_CPUHINT, u_int32_t
  100.  * Function: Create
  101.  *           The CPU number the task should start on.
  102.  *           This is only a hint and no gurantee.
  103.  */
  104. #define    THREADTAG_CPUHINT    (THREADTAG_DUMMY + 0xd)
  105.  
  106. /* Sequence: THREADTAG_STARTPC, u_int32_t
  107.  * Function: Create
  108.  *           defines the start for this thread
  109.  */
  110. #define    THREADTAG_STARTPC    (THREADTAG_DUMMY + 0xe)
  111.  
  112. /* Sequence: THREADTAG_STACK, void*
  113.  * Function: Create
  114.  *           defines the virtuell stack ptr for a thread
  115.  *           Only useful if you create a virtual process space
  116.  */
  117. #define    THREADTAG_STACK        (THREADTAG_DUMMY + 0xf)
  118.  
  119. /* Sequence: THREADTAG_STACKSIZE, u_int32_t
  120.  * Function: Create
  121.  *           defines the thread`s stacksize
  122.  */
  123. #define    THREADTAG_STACKSIZE    (THREADTAG_DUMMY + 0x10)
  124.  
  125. /* Sequence: THREADTAG_WAIT, q_signalmask_t
  126.  * Function: Create
  127.  *           The Thread is started blocked(WaitMask==0)
  128.  *           You can activate it with a QSignal(TID,0)
  129.  * !!ATTENTION!!
  130.  * this tag will probably changed.
  131.  */
  132. #define    THREADTAG_WAIT        (THREADTAG_DUMMY + 0x11)
  133.  
  134. #define    THREADTAG_USERTAG0    (THREADTAG_DUMMY + 0x12)
  135.  
  136. /* Sequence: THREADTAG_ERROR, u_int32_t*
  137.  * Function: Create
  138.  *           defines the ptr for a more precise return
  139.  *           error result
  140.  */
  141. #define    THREADTAG_ERROR        (THREADTAG_DUMMY + 0x13)
  142.  
  143. /* Sequence: THREADTAG_EXCEPTIONTID,(q_tid_t*)
  144.  * Function: Create
  145.  *           defines the ptr to the special exception
  146.  *           handler tid.
  147.  */
  148. #define    THREADTAG_EXCEPTIONTID    (THREADTAG_DUMMY + 0x14)
  149.  
  150. /* Sequence: THREADTAG_TASKEXCEPTIONTID,(q_tid_t*)
  151.  * Function: Create
  152.  *           defines the ptr to the task default exception handler
  153.  *           tid for all threads which are created in it.
  154.  *           Can be overruled with THREADTAG_EXCEPTIONTID
  155.  */
  156. #define    THREADTAG_TASKEXCEPTIONTID    (THREADTAG_DUMMY + 0x15)
  157.  
  158. /*
  159.  * Error Types
  160.  */
  161.  
  162. #define    THREADERROR_OK        0
  163. #define    THREADERROR_NOMEMORY    1
  164. #define    THREADERROR_NOPORT    2
  165. #define    THREADERROR_NOTID    3
  166. #define    THREADERROR_NOPID    4
  167.  
  168. /*
  169.  * Can`t obtain the physical address for your
  170.  * supplied virtual stack address.
  171.  * Then the last return function handling
  172.  * fails as it can`t make the necessary
  173.  * stack modification.
  174.  */
  175. #define    THREADERROR_NOPHYSICALSTACK    5
  176.  
  177.  
  178.  
  179. /* Scheduler Classes
  180.  */
  181.  
  182. #define    THREADCLASS_INTSERVER    0
  183. #define    THREADCLASS_REALTIME    1
  184. #define    THREADCLASS_NORMAL    2
  185.  
  186.  
  187.  
  188. /* GetThreadAttr()
  189.  * SetThreadAttr()
  190.  */
  191.  
  192. #define THREADATTRTAG_DUMMY        (0x1500)
  193.  
  194. /* Sequence: THREADATTRTAG_GETSIZE
  195.  * Function: Get
  196.  *           Get the size of an operation
  197.  */
  198. #define THREADATTRTAG_GETSIZE        (THREADATTRTAG_DUMMY + 0x1)
  199.  
  200. /* Sequence: THREADATTRTAG_QUERY
  201.  * Function: Get
  202.  *           Get all tag types
  203.  */
  204. #define THREADATTRTAG_QUERY        (THREADATTRTAG_DUMMY + 0x2)
  205.  
  206. /* Sequence: THREADATTRTAG_NAME
  207.  *   MyData: char*
  208.  * Function: Get
  209.  *           Get name of thread
  210.  */
  211. #define THREADATTRTAG_NAME        (THREADATTRTAG_DUMMY + 0x3)
  212.  
  213. /* Sequence: THREADATTRTAG_NAMESIZE
  214.  *   MyData: u_int32_t*
  215.  * Function: Get
  216.  *           Get the size of the thread name
  217.  */
  218. #define THREADATTRTAG_NAMESIZE        (THREADATTRTAG_DUMMY + 0x4)
  219.  
  220. /* Sequence: THREADATTRTAG_CLASS
  221.  *   MyData: u_int32_t
  222.  * Function: Get/Set
  223.  *           get/set the scheduling class of the Thread
  224.  */
  225. #define THREADATTRTAG_CLASS        (THREADATTRTAG_DUMMY + 0x5)
  226.  
  227. /* Sequence: THREADATTRTAG_CLASSPRI
  228.  *   MyData: int32_t
  229.  * Function: Get/Set
  230.  *           get/set the scheduling priority in the Thread`s
  231.  *           class queue
  232.  */
  233. #define THREADATTRTAG_CLASSPRI        (THREADATTRTAG_DUMMY + 0x6)
  234.  
  235. /* Sequence: THREADATTRTAG_CPU
  236.  *   MyData: u_int32_t
  237.  * Function: Get/Set
  238.  *           get/set the thread`s cpu.
  239.  */
  240. #define THREADATTRTAG_CPU        (THREADATTRTAG_DUMMY + 0x7)
  241.  
  242. /* Sequence: THREADATTRTAG_SIGALLOC
  243.  *   MyData: q_signalmask_t*
  244.  * Function: Get
  245.  *           get the thread`s allocated signalmask.
  246.  */
  247. #define THREADATTRTAG_SIGALLOC        (THREADATTRTAG_DUMMY + 0x8)
  248.  
  249. /* Sequence: THREADATTRTAG_SIGWAIT
  250.  *   MyData: q_signalmask_t*
  251.  * Function: Get
  252.  *           get the thread`s wait signalmask.
  253.  */
  254. #define THREADATTRTAG_SIGWAIT        (THREADATTRTAG_DUMMY + 0x9)
  255.  
  256. /* Sequence: THREADATTRTAG_SIGRECVD
  257.  *   MyData: q_signalmask_t*
  258.  * Function: Get
  259.  *           get the thread`s received signalmask.
  260.  */
  261. #define THREADATTRTAG_SIGRECVD        (THREADATTRTAG_DUMMY + 0xa)
  262.  
  263. /* Sequence: THREADATTRTAG_USERDATA
  264.  *   MyData: void*
  265.  * Function: Get/Set
  266.  *           get/set the thread`s userdata
  267.  */
  268. #define THREADATTRTAG_USERDATA        (THREADATTRTAG_DUMMY + 0xb)
  269.  
  270. /* Sequence: THREADATTRTAG_USERDATASIZE
  271.  *   MyData: u_int32_t
  272.  * Function: Get
  273.  *           get the thread`s userdata size
  274.  */
  275. #define THREADATTRTAG_USERDATASIZE    (THREADATTRTAG_DUMMY + 0xc)
  276.  
  277. /* Sequence: THREADATTRTAG_TID
  278.  *   MyData: q_tid_t
  279.  * Function: Get
  280.  *           get the thread`s tid
  281.  */
  282. #define    THREADATTRTAG_TID        (THREADATTRTAG_DUMMY + 0xd)
  283.  
  284. /* Sequence: THREADATTRTAG_CHIEFTID
  285.  *   MyData: q_tid_t
  286.  * Function: Get
  287.  *           get the thread`s chief tid
  288.  */
  289. #define    THREADATTRTAG_CHIEFTID        (THREADATTRTAG_DUMMY + 0xe)
  290.  
  291. /* Sequence: THREADATTRTAG_USERTAG0
  292.  *   MyData: u_int32_t
  293.  * Function: Get/Set
  294.  *           some private usertag field
  295.  */
  296. #define THREADATTRTAG_USERTAG0        (THREADATTRTAG_DUMMY + 0xf)
  297.  
  298. /* Sequence: THREADATTRTAG_START
  299.  *   MyData: u_int32_t
  300.  * Function: Get/Set
  301.  *           some private usertag field
  302.  */
  303. //#define THREADATTRTAG_START        (THREADATTRTAG_DUMMY + 0x10)
  304.  
  305. /* Sequence: THREADATTRTAG_EXCEPTIONTYPE.
  306.  *   MyData: u_int32_t
  307.  * Function: Get
  308.  *           get the type of an exception.
  309.  *         Only useful if the thread causes an
  310.  *         exception. The value remains valid
  311.  *         until the next exception happens.
  312.  */
  313. #define THREADATTRTAG_EXCEPTIONTYPE    (THREADATTRTAG_DUMMY + 0x11)
  314.  
  315. /* Sequence: THREADATTRTAG_EXCEPTIONTID.
  316.  *   MyData: q_tid_t*
  317.  * Function: Get/set
  318.  *           get/set the thread`s private exception tid.
  319.  *           This TID is send an OS message to signal
  320.  *         an exception.
  321.  */
  322. #define THREADATTRTAG_EXCEPTIONTID    (THREADATTRTAG_DUMMY + 0x12)
  323.  
  324.  
  325. /*
  326.  * PPC register fields of the thread
  327.  */
  328.  
  329. /* Sequence: THREADATTRTAG_PPC_SRR0
  330.  *   MyData: size_t*
  331.  * Function: Get/set
  332.  *           get/set the thread`s SRR0 register
  333.  */
  334. #define THREADATTRTAG_PPC_SRR0        (THREADATTRTAG_DUMMY + 0x50)
  335.  
  336. /* Sequence: THREADATTRTAG_PPC_SRR1
  337.  *   MyData: size_t*
  338.  * Function: Get/set
  339.  *           get/set the thread`s SRR1 register
  340.  */
  341. #define THREADATTRTAG_PPC_SRR1        (THREADATTRTAG_DUMMY + 0x51)
  342.  
  343. /* Sequence: THREADATTRTAG_PPC_LR
  344.  *   MyData: size_t*
  345.  * Function: Get/set
  346.  *           get/set the thread`s LR register
  347.  */
  348. #define THREADATTRTAG_PPC_LR        (THREADATTRTAG_DUMMY + 0x52)
  349.  
  350. /* Sequence: THREADATTRTAG_PPC_CTR
  351.  *   MyData: size_t*
  352.  * Function: Get/set
  353.  *           get/set the thread`s CTR register
  354.  */
  355.  
  356. #define THREADATTRTAG_PPC_CTR        (THREADATTRTAG_DUMMY + 0x53)
  357.  
  358. /* Sequence: THREADATTRTAG_PPC_CR
  359.  *   MyData: size_t*
  360.  * Function: Get/set
  361.  *           get/set the thread`s CR register
  362.  */
  363. #define THREADATTRTAG_PPC_CR        (THREADATTRTAG_DUMMY + 0x54)
  364.  
  365. /* Sequence: THREADATTRTAG_PPC_XER
  366.  *   MyData: size_t*
  367.  * Function: Get/set
  368.  *           get/set the thread`s SRR1 register
  369.  */
  370.  
  371. #define THREADATTRTAG_PPC_XER        (THREADATTRTAG_DUMMY + 0x55)
  372.  
  373. /* Sequence: THREADATTRTAG_PPC_FPSCR
  374.  *   MyData: float64_t*
  375.  * Function: Get/set
  376.  *           get/set the thread`s FPSCR register
  377.  */
  378.  
  379. #define THREADATTRTAG_PPC_FPSCR        (THREADATTRTAG_DUMMY + 0x56)
  380.  
  381.  
  382. /* Sequence: THREADATTRTAG_PPC_GPR, u_int32_t Offset, u_int32_t Number
  383.  *   MyData: u_int32_t*
  384.  * Function: Get/set
  385.  *           get/set the thread`s GPR registers
  386.  */
  387. #define THREADATTRTAG_PPC_GPR        (THREADATTRTAG_DUMMY + 0x57)
  388.  
  389. /* Sequence: THREADATTRTAG_PPC_FPR, u_int32_t Offset, u_int32_t Number
  390.  *   MyData: float64_t*
  391.  * Function: Get/set
  392.  *           get/set the thread`s FPR registers
  393.  */
  394. #define THREADATTRTAG_PPC_FPR        (THREADATTRTAG_DUMMY + 0x58)
  395.  
  396. /* Sequence: THREADATTRTAG_PPC_VMX, u_int32_t Offset, u_int32_t Number
  397.  *   MyData: vector128_t*
  398.  * Function: Get/set
  399.  *           get/set the thread`s VMX registers
  400.  *           (optional PPC register)
  401.  */
  402. #define THREADATTRTAG_PPC_VMX        (THREADATTRTAG_DUMMY + 0x59)
  403.  
  404. /* Sequence: THREADATTRTAG_PPC_VSAVE
  405.  *   MyData: u_int32_t
  406.  * Function: Get/set
  407.  *           get/set the thread`s VSAVE register
  408.  *           (optional PPC register)
  409.  */
  410. #define THREADATTRTAG_PPC_VSAVE        (THREADATTRTAG_DUMMY + 0x60)
  411.  
  412. /* Sequence: THREADATTRTAG_PPC_VSCR
  413.  *   MyData: vector128_t
  414.  * Function: Get/set
  415.  *           get/set the thread`s VSCR register
  416.  *           (optional PPC register)
  417.  */
  418. #define THREADATTRTAG_PPC_VSCR        (THREADATTRTAG_DUMMY + 0x61)
  419.  
  420.  
  421. /* Sequence: THREADATTRTAG_PPC_IABR
  422.  *   MyData: size_t*
  423.  * Function: Get/Set
  424.  *           get/set the thread`s IABR register
  425.  *           (optional PPC register)
  426.  */
  427. #define THREADATTRTAG_PPC_IABR        (THREADATTRTAG_DUMMY + 0x62)
  428.  
  429. /* Sequence: THREADATTRTAG_PPC_DABR
  430.  *   MyData: size_t*
  431.  * Function: Get/Set
  432.  *           get/set the thread`s DABR register
  433.  *           (optional PPC register)
  434.  */
  435. #define THREADATTRTAG_PPC_DABR        (THREADATTRTAG_DUMMY + 0x63)
  436.  
  437. /* Sequence: THREADATTRTAG_PPC_MMCR0
  438.  *   MyData: size_t*
  439.  * Function: Get/Set
  440.  *           get/set the thread`s MMCR0 register
  441.  *           (optional PPC register)
  442.  */
  443. #define THREADATTRTAG_PPC_MMCR0        (THREADATTRTAG_DUMMY + 0x64)
  444.  
  445. /* Sequence: THREADATTRTAG_PPC_MMCR1
  446.  *   MyData: size_t*
  447.  * Function: Get/Set
  448.  *           get/set the thread`s MMCR1 register
  449.  *           (optional PPC register)
  450.  */
  451. #define THREADATTRTAG_PPC_MMCR1        (THREADATTRTAG_DUMMY + 0x65)
  452.  
  453. /* Sequence: THREADATTRTAG_PPC_MMCR2
  454.  *   MyData: size_t*
  455.  * Function: Get/Set
  456.  *           get/set the thread`s MMCR2 register
  457.  *           (optional PPC register)
  458.  */
  459. #define THREADATTRTAG_PPC_MMCR2        (THREADATTRTAG_DUMMY + 0x66)
  460.  
  461. /* Sequence: THREADATTRTAG_PPC_PMC1
  462.  *   MyData: size_t*
  463.  * Function: Get/Set
  464.  *           get/set the thread`s PMC1 register
  465.  *           (optional PPC register)
  466.  */
  467. #define THREADATTRTAG_PPC_PMC1        (THREADATTRTAG_DUMMY + 0x67)
  468.  
  469. /* Sequence: THREADATTRTAG_PPC_PMC2
  470.  *   MyData: size_t*
  471.  * Function: Get/Set
  472.  *           get/set the thread`s PMC2 register
  473.  *           (optional PPC register)
  474.  */
  475. #define THREADATTRTAG_PPC_PMC2        (THREADATTRTAG_DUMMY + 0x68)
  476.  
  477. /* Sequence: THREADATTRTAG_PPC_PMC3
  478.  *   MyData: size_t*
  479.  * Function: Get/Set
  480.  *           get/set the thread`s PMC3 register
  481.  *           (optional PPC register)
  482.  */
  483. #define THREADATTRTAG_PPC_PMC3        (THREADATTRTAG_DUMMY + 0x69)
  484.  
  485. /* Sequence: THREADATTRTAG_PPC_PMC4
  486.  *   MyData: size_t*
  487.  * Function: Get/Set
  488.  *           get/set the thread`s PMC4 register
  489.  *           (optional PPC register)
  490.  */
  491. #define THREADATTRTAG_PPC_PMC4        (THREADATTRTAG_DUMMY + 0x6a)
  492.  
  493. /* Sequence: THREADATTRTAG_PPC_SIA
  494.  *   MyData: size_t*
  495.  * Function: Get/Set
  496.  *           get/set the thread`s SIA register
  497.  *           (optional PPC register)
  498.  */
  499. #define THREADATTRTAG_PPC_SIA        (THREADATTRTAG_DUMMY + 0x6b)
  500.  
  501. /* Sequence: THREADATTRTAG_PPC_SDA
  502.  *   MyData: size_t*
  503.  * Function: Get/Set
  504.  *           get/set the thread`s SDA register
  505.  *           (optional PPC register)
  506.  */
  507. #define THREADATTRTAG_PPC_SDA        (THREADATTRTAG_DUMMY + 0x6c)
  508.  
  509.  
  510. /* Sequence: THREADATTRTAG_PPC_DSISR
  511.  *   MyData: size_t*
  512.  * Function: Get
  513.  *           get the thread`s DSISR register.
  514.  *         Only useful if the thread causes an
  515.  *         exception. The value remains valid
  516.  *         until the next exception happens.
  517.  */
  518. #define THREADATTRTAG_PPC_DSISR        (THREADATTRTAG_DUMMY + 0x6d)
  519.  
  520. /* Sequence: THREADATTRTAG_PPC_DAR
  521.  *   MyData: size_t*
  522.  * Function: Get
  523.  *           get the thread`s DAR register.
  524.  *         Only useful if the thread causes an
  525.  *         exception. The value remains valid
  526.  *         until the next exception happens.
  527.  */
  528. #define THREADATTRTAG_PPC_DAR        (THREADATTRTAG_DUMMY + 0x6e)
  529.  
  530. /* Sequence: THREADATTRTAG_PPC_FPECR
  531.  *   MyData: size_t*
  532.  * Function: Get
  533.  *           get the thread`s FPECR register.
  534.  *         Only useful if the thread causes an
  535.  *         exception. The value remains valid
  536.  *         until the next exception happens.
  537.  */
  538. #define THREADATTRTAG_PPC_FPECR        (THREADATTRTAG_DUMMY + 0x6f)
  539.  
  540.  
  541.  
  542.  
  543.  
  544. /* Sequence: THREADATTRTAG_PPC_REGFRAME
  545.  *   MyData: struct PPCRegFrame *
  546.  * Function: Get/Set
  547.  *           get/set a full regframe
  548.  */
  549. #define THREADATTRTAG_PPC_REGFRAME    (THREADATTRTAG_DUMMY + 0x100)
  550.  
  551.  
  552. /*
  553.  * Thread states
  554.  */
  555.  
  556. #define    THREADSTATE_INVALID    0
  557. #define    THREADSTATE_RUN        1
  558. #define    THREADSTATE_READY    2
  559. #define    THREADSTATE_WAIT    3
  560. #define    THREADSTATE_WAITINT    4    /* Interrupt Task */
  561. #define    THREADSTATE_DEADSOON    5    /* when it waits for village threads to die */
  562. #define    THREADSTATE_DEAD    6    /* when it`s dead */
  563. #define    THREADSTATE_INACTIVE    7    /* when it`s still alive but inactive */
  564. #define    THREADSTATE_INIT    8    /* when it`s in the init state...internal usage */
  565. #define    THREADSTATE_REMOVED    9    /* when it`s in the remove state...internal usage */
  566. #define    THREADSTATE_EXCEPTION    10    /* when it`s in the exception state...internal usage */
  567.  
  568.  
  569.  
  570. /* Signals
  571.  */
  572.  
  573. /* As an input Signal it means..get any signal
  574.  * which is free
  575.  * As a Result it means there`s no free signal
  576.  * anymore
  577.  */
  578.  
  579. #define    SIGNAL_NONE    (-1)
  580.  
  581.  
  582. /* !!!!!!!Attention!!!!!!!!!!!!
  583.  * If you change something here you better also
  584.  * fix emulmodules/exec68k/tasks.c
  585.  */
  586. struct PPCRegFrame
  587. {
  588.     u_int32_t        StackGap[4];        /* StackFrame Gap..so a function working
  589.                                                          * with the PPCRegFrame as the GPR1 doesn`t
  590.                                                          * overwrite any contents with a LR store at 4(1)
  591.                                                          */
  592.  
  593.     u_int32_t        Version;        /* Version of the structure */
  594.     u_int32_t        Type;            /* Type of the regframe */
  595.     u_int32_t        Flags;            /* The filled up registers */
  596.     u_int32_t        State;            /* State of the Thread(only used for Get) */
  597.  
  598.     u_int32_t        SRR0;
  599.     u_int32_t        SRR1;
  600.     u_int32_t        LR;
  601.     u_int32_t        CTR;
  602.  
  603.     u_int32_t        CR;
  604.     u_int32_t        XER;
  605.  
  606.     u_int32_t        GPR[32];
  607.  
  608.     float64_t        FPR[32];
  609.     float64_t        FPSCR;
  610.  
  611.     u_int32_t        VSAVE;
  612.     u_int32_t        AlignPad0;
  613.     u_int32_t        AlignPad1;
  614.     u_int32_t        AlignPad2;
  615.     vector128_t        VSCR;
  616.     vector128_t        VMX[32];
  617.     /* no size
  618.          */
  619. };
  620.  
  621. #define    REGFRAMEFLAGF_FPU    0x1
  622. #define    REGFRAMEFLAGF_VMX    0x2
  623.  
  624.  
  625. #endif
  626.