Mercurial > hg > Game > CbCTaskManager
changeset 4:5a3e2b0622fd
testcommit.
author | kent <kent@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 25 Dec 2009 17:51:13 +0900 |
parents | 4595d57d8dd6 |
children | 91a07e20e06d |
files | List.c Task.h |
diffstat | 2 files changed, 12 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/List.c Wed Dec 23 00:48:25 2009 +0900 +++ b/List.c Fri Dec 25 17:51:13 2009 +0900 @@ -154,7 +154,7 @@ List * _listIterRemoveCurrent(ListIter *iter) { - List *cur, *p, *n; + List *cur; if (!iter->head) return NULL; else if (!iter->next) cur = iter->head->prev; else cur = iter->next->prev;
--- a/Task.h Wed Dec 23 00:48:25 2009 +0900 +++ b/Task.h Fri Dec 25 17:51:13 2009 +0900 @@ -1,28 +1,26 @@ #ifndef _TASK_H #define _TASK_H -// ユーザ側でもこのヘッダファイルをインクルードする +// included by user. + #include "List.h" +#include "interface.h" + -/* used by User'sTask. */ -typedef __code (*Taskrun)(void*, void*, void*); -//typedef __code (*Scheduler)(TaskScheduler*,__code(*)(void*,void*,void*), void*, void*); -//typedef __code (*Taskrun)(_code(*)(void*,void*,void*), void*, void*); -//typedef __code (*Scheduler)(__code(*)(void*,void*,void*), void*, void*); -//typedef __code (*Scheduler)(Taskrun, void*, void*); -//typedef __code (*Taskrun)(Scheduler, void*, void*); -#define END (NULL) +#define F_NONE 0x000 +#define F_STARTER 0x001 +#define F_a 0x002 +#define F_b 0x004 -/* C++CeriumでのTaskObjectにあたる */ typedef struct _TaskType { Taskrun code; char *name; - uint8 flag; + unsigned int flag; // F_STARTER .. } TaskType; /* defined by user automatically. */ +extern const TaskType tasktypes[]; extern const int max_tasktype; -extern const TaskType tasktypes[]; enum cpu { ANY = 0, // not implemented yet. @@ -46,12 +44,11 @@ enum cpu cpu; } Task; + /* user interfaces. */ extern Task * createTask (int, char *); extern void taskSetData (Task *, void *, int, void *, int); extern void taskSetWait (Task *, Task *); -extern __code (*scheduler)(void*,Taskrun,void*,void*); - #endif /* _TASK_H */