root/include/dryos23.h

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

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