Chat freely about anything...

User avatar
By lakid
#22751 Hi All
Apologies if this is the wrong sub board...
From my understanding of the SDK, you can have up to 3 os_tasks to do different things.
The vast majority of examples only ever seem to set up 1 task with a delay and nothing else.
Other functionality is then delivered by 1-shot or repeating timers or interrrupts.
What purpose do the system_os_task and system_os_post serve ? It's not an RTOS and it seems (from my tests) that even if multiple system_os_tasks are defined and then posted to, only one task ever seems to run.
Thanks
lakid
User avatar
By kolban
#23195 Granted it does seem quite an obscure set of semantics. My best guess is that it allows us to register a function which will be called at some time in the future (as quickly as possible I imagine) after we return control to the OS.

Now ... why we might not want to call the logic of the task function then and there ... I don't know. Perhaps it allows us to register an "anonymous" function where "somebody else" registered it ... but that's getting more far fetched.