/**************************************************************************************
Copyright (c) 2002
The UbixOS Project
$Id$
**************************************************************************************/
#include <ubixos/schedule.h>
int currentProc;
struct taskStruct taskList[numTasks];
struct taskStruct *_current,*_usedMath = 0x0;
/* Initialize Scheduler */
void initScheduler(void) {
int i;
for (i=0;i<numTasks;i++) {
taskList[i].id = i;
taskList[i].status = AVAILABLE;
taskList[i].usedMath = 0;
}
currentProc = -1;
}
/* Finds A Free Task */
int findTask() {
int i;
for (i=0;i<numTasks;i++) {
if (taskList[i].status == AVAILABLE) {
return(i);
}
}
return(-1);
}