=================================================================== RCS file: /cvs/funnyos/sys/kern_sched.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- funnyos/sys/kern_sched.h 2007/11/19 15:54:33 1.1 +++ funnyos/sys/kern_sched.h 2007/11/20 12:57:37 1.2 @@ -1,5 +1,5 @@ /* - * $Id: kern_sched.h,v 1.1 2007/11/19 15:54:33 nbrk Exp $ + * $Id: kern_sched.h,v 1.2 2007/11/20 12:57:37 nbrk Exp $ */ #ifndef _SYS_KERN_SCHED_H #define _SYS_KERN_SCHED_H @@ -10,8 +10,8 @@ */ struct taskheader { const char *th_name; /* task name */ - void (*th_enter)(void *arg); /* entry point */ - uint8_t ta_priority; /* priority, less value = higher priority */ + uint8_t th_priority; /* priority, bigger the value = higher priority */ + void (*th_enter)(void); /* entry point */ }; /* @@ -25,6 +25,8 @@ uint8_t ta_state; /* task state (running, blocked, etc.) */ uint32_t ta_timeo; /* timeout (in HZ) if task is blocked */ uint32_t *ta_stackptr; /* task stack addr (used to switch-back to that task) */ + + struct task *ta_nextp; }; /* @@ -34,6 +36,12 @@ #define TASK_READY 0x01 /* ready for schedule */ #define TASK_RUNNING 0x02 /* running now */ #define TASK_SLEEPING 0x04 /* task waits for (planned) timeout */ + + +/* + * Functions. + */ +void sched_init(void); #endif /* not _SYS_KERN_SCHED_H */