Mercurial > hg > Game > Cerium
view include/TaskManager/task.h @ 42:aa11038dbdc1
*** empty log message ***
author | gongo |
---|---|
date | Thu, 14 Feb 2008 18:27:37 +0900 |
parents | 3d377547cf6d |
children | 90523ccc4dff |
line wrap: on
line source
#ifndef INCLUDED_TASK #define INCLUDED_TASK #define TASK_MAX_SIZE 200 typedef struct task_queue TaskQueue, *TaskQueuePtr; typedef struct htask HTask, *HTaskPtr; typedef struct task { int command; int in_size; // DMA_GET size unsigned int in_addr; // DMA_GET address unsigned int out_addr; // DMA_PUT address HTaskPtr self; } Task, *TaskPtr; struct htask { int command; int in_size; unsigned int in_addr; unsigned int out_addr; TaskQueuePtr wait_me; // List of task waiting for me TaskQueuePtr wait_i; // List of task for which I am waiting void (*post_func)(void); struct htask *next; }; struct task_queue { HTaskPtr task; TaskQueuePtr next; }; typedef struct task_list { int length; struct task_list *next; //unsigned int next; Task tasks[TASK_MAX_SIZE]; } TaskList, *TaskListPtr; #endif