diff options
| author | Christian Cunningham <cc@localhost> | 2022-01-21 11:37:49 -0700 | 
|---|---|---|
| committer | Christian Cunningham <cc@localhost> | 2022-01-21 11:37:49 -0700 | 
| commit | 00660fb9143daf7fa04647bccd6047b9bf0f5e48 (patch) | |
| tree | 804fd0acb47dbd6b6f7120653c9ab58d5498328c /later/schedule.flat.c | |
| parent | 0ff3f3c6f0773c7023b86bc829ff607e934bc2dc (diff) | |
Scheduler Rewrite Start
Diffstat (limited to 'later/schedule.flat.c')
| -rw-r--r-- | later/schedule.flat.c | 32 | 
1 files changed, 0 insertions, 32 deletions
| diff --git a/later/schedule.flat.c b/later/schedule.flat.c deleted file mode 100644 index 6eb0d14..0000000 --- a/later/schedule.flat.c +++ /dev/null @@ -1,32 +0,0 @@ -#ifdef FLAT - -#include "../sys/schedule.h" -static struct Task* task_list[256]; - -static struct Scheduler scheduler = { -	.tasks = task_list, -}; - -static unsigned int ntask_i = 0; - -void add_task(struct Task* t) -{ -	scheduler.tasks[ntask_i] = t; -	ntask_i += 1; -	if (ntask_i > 256) { -		ntask_i = 0; -	} -} - -unsigned int get_task_length(void) -{ -	return ntask_i; -} - -void execute_task(void) -{ -	if (scheduler.tasks[ntask_i-1] != 0) -		scheduler.tasks[ntask_i-1]->task(); -} - -#endif | 
