-->
Page 1 of 1

system_os_task vs timers ?

PostPosted: Tue Jul 07, 2015 11:32 pm
by lakid
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

Re: system_os_task vs timers ?

PostPosted: Mon Jul 13, 2015 8:51 pm
by kolban
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.