Chat freely about anything...

User avatar
By RogerClark
#4709 I did some experiments and unless you post an empty message to a newly setup task, it doesn't get called with system idle events.

Also..

If you say that there is only a single task for each priority, this means that there can only be 4 tasks, because the SDK, currently only defines enums for 4 priorities, 0,1,2, and MAX.

This also presumes there are no system tasks.

How do we know there are no other system tasks running at these priorities?

Unless these processes are all user processes, and we are saying you can only have 4, so if you want to have 2 bits of separate code running at priority 0, you must put them in the same function.?
User avatar
By igrr
#4727 There can be a maximum of 3 user tasks (with priorities 0, 1, 2) — hence USER_TASK_PRIO_MAX = 3.
Regarding running two tasks with the same priority — you can only have one, and then you can do something like this in the task handler function:
Code: Select allvoid task_handler(os_event_t *pEvent)
{
    if (pEvent->par == 0)
    {
        do_task0();
    }
    else if (pEvent->par == 1)
    {
        do_task1();
    }
}

And pass the corresponding parameter when you do system_os_post.
User avatar
By RogerClark
#4729
There can be a maximum of 3 user tasks (with priorities 0, 1, 2) — hence USER_TASK_PRIO_MAX = 3.


OK. It seems a bit odd that the max number of tasks is defined inside the same enum that defines that task numbers / priorities

But I see in the docs it states

currently supports three message-level tasks, 0/1/2


However of course the docs could be slightly incorrect ;-)