root/include/dryos31.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef _DRYOS_R31_
   2 #define _DRYOS_R31_
   3 /******************************************************************************/
   4 /**              DRYOS version 2.3, release #0031                            **/
   5 /**              DRYOS version 2.3, release #0039                            **/
   6 /**              Internal DryOS kernel data types and constants              **/
   7 /******************************************************************************/
   8 #define TASK_STATE_READY    0
   9 #define TASK_STATE_WAIT     1
  10 #define TASK_STATE_SUSPEND  2
  11 /******************************************************************************/
  12 // Task context
  13 struct context_t
  14 {
  15     unsigned int cpsr;
  16     unsigned int r[13];
  17     unsigned int lr;
  18     unsigned int pc;
  19 };
  20 typedef struct context_t context_t;
  21 /******************************************************************************/
  22 // Task control block
  23 struct task_t
  24 {
  25     unsigned int unknown1[2];
  26     unsigned int priority;
  27     void *entry;
  28     unsigned int argument;
  29     unsigned int unknown2[2];
  30     void *stack_addr;
  31     unsigned int stack_size;
  32     char *name;
  33     unsigned int unknown3[6];
  34     unsigned int task_id;
  35     unsigned char unknown4[5];
  36     unsigned char state;
  37     unsigned char unknown5[6];
  38     context_t *context;         // SP value, context stored on the stack
  39 };
  40 typedef struct task_t task_t;
  41 /******************************************************************************/
  42 #endif

/* [<][>][^][v][top][bottom][index][help] */