[eduos] Re: MultiEdu


>> Just use registerKernelTask for each task you want to start.
>> registerTaskDescriptor should not be used! registerKernelTask does the
>> job for you. Take a look at task.c or the implementation. When using
>> registerTaskDescriptor yourself, you need to setup the task_entry
>> yourself.

> oK, I was confused because I found "/* Register a task that runs in the
> same memory area as the kernel, with just another stack. This is only for
> testing.*/" in the code, so I thinked it wasn't the right way for use
> multi-tasking. But, Frank, if I register a Task, and I give it 200
> miliseconds (for example), and then I want that other task use the CPU,
> how can I get that it happen......when I sleep or froze the current task,
> automatically the next task begin to use the CPU? If I'm wrong, how I
> could do that tasks use the CPU...?

When you make a task sleep, the multi-tasker just continues to run all the
other tasks in the queue. After 200 msecs that sleeping task gets
activated and will also get some CPU time from that moment on.
The multi-tasker just keeps on running through
the task-queue, executing all the tasks -that are not sleeping or frozen-
in round-robin fashion.
Take a look at the multitasker code in task.c, function name:
        multiTasker
for more info.

>> BTW: I won't be able to track/fix the scanf bug very fast, since I have
>> to study for my examinations.
>If I discover the bug is in me....I'll tell you

Could it be that you're doing:
        int var;
        scanf ("%d", var);
instead of:
        scanf ("%d", &var);
?

Frank.

----------------------------------------
The EduOS home page can be found at:
http://studwww.rug.ac.be/~fcorneli/eduos
----------------------------------------

Other related posts: