What functions are called and when by the firmware? - page 3 - General Discussion and Assistance - CHDK Forum supplierdeeply

What functions are called and when by the firmware?

  • 20 Replies

Offline reyalp

  • ******
  • 13718
Re: What functions are called and when by the firmware?
« Reply #20 on: 24 / August / 2011, 00:20:31 »
still have questions about the tasks. I've dug through the forums and wiki and havn't found very much info. I understand it's "cooperative" multitasking which means the task runs until a "sleeptask" is then the next task can run, but how does it really work?
I'm not sure what you are asking. SleepTask immediately yields the current task, and the OS scheduler decides what to do next. DryOS isn't publicly documented, but you can find plenty of documentation on VxWorks, and DryOS behaves very similarly.
exp_drv_task does the live view and metering right?
As far as I know, it only controls the actual exposure. The only thing we do there is override shutter time. This is mostly for super long (>64 sec) exposures, but also needed on some cameras for very short exposures.
Also, I've been wondering, why do we need spytask? Couldn't raw processing be done at "capt_seq_hook_raw_here()" and the gui redrawn in kbd_task?
spytask predates my involvement with the project, I wouldn't be inclined to mess with it without reason. It runs at a lower (numerically higher) priority than kbd_task and capt_seq, so the impact of things time consuming like gui drawing and raw saving would be affected. If I was going to re-work tasking, I'd split script out into it's own task(s) with proper inter-task communication. That would allow us to use regular OS scheduling instead of the debug hook yield stuff, and would also make yielding across pcall and other C calls work.
Don't forget what the H stands for.


Related Topics